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, {
|
9b6ff1ce
huixisheng
add test and upda...
|
11
|
// 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;
|