Blame view

build/webpack.test.config.js 553 Bytes
9b6ff1ce   huixisheng   add test and upda...
1
2
3
4
  /**
   * 用于单元测试
   */
  
1f9fbacf   Clark Du   add eslint config...
5
6
  var webpack = require('webpack');
  var merge = require('webpack-merge');
9b6ff1ce   huixisheng   add test and upda...
7
8
9
10
11
  var webpackBaseConfig = require('./webpack.base.config.js');
  
  
  var webpackConfig = merge(webpackBaseConfig, {
    // use inline sourcemap for karma-sourcemap-loader
1f9fbacf   Clark Du   add eslint config...
12
13
14
15
16
17
18
19
20
      devtool: '#inline-source-map',
      plugins: [
          new webpack.DefinePlugin({
              'process.env': {
                  NODE_ENV: '"testing"'
              }
          })
      ]
  });
9b6ff1ce   huixisheng   add test and upda...
21
22
  
  // no need for app entry during tests
1f9fbacf   Clark Du   add eslint config...
23
  delete webpackConfig.entry;
9b6ff1ce   huixisheng   add test and upda...
24
  
1f9fbacf   Clark Du   add eslint config...
25
  module.exports = webpackConfig;