Blame view

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