Blame view

build/webpack.test.config.js 505 Bytes
9b6ff1ce   huixisheng   add test and upda...
1
2
3
4
  /**
   * 用于单元测试
   */
  
4a7f28fd   Sergio Crisostomo   eslint and replac...
5
6
7
  const webpack = require('webpack');
  const merge = require('webpack-merge');
  const webpackBaseConfig = require('./webpack.base.config.js');
9b6ff1ce   huixisheng   add test and upda...
8
9
  
  
4a7f28fd   Sergio Crisostomo   eslint and replac...
10
  const webpackConfig = merge(webpackBaseConfig, {
71eb889f   Graham Fairweather   Enable creation o...
11
      devtool: 'eval-source-map',
1f9fbacf   Clark Du   add eslint config...
12
13
14
15
16
17
18
19
      plugins: [
          new webpack.DefinePlugin({
              'process.env': {
                  NODE_ENV: '"testing"'
              }
          })
      ]
  });
9b6ff1ce   huixisheng   add test and upda...
20
21
  
  // no need for app entry during tests
1f9fbacf   Clark Du   add eslint config...
22
  delete webpackConfig.entry;
9b6ff1ce   huixisheng   add test and upda...
23
  
1f9fbacf   Clark Du   add eslint config...
24
  module.exports = webpackConfig;