-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.test.config.js
45 lines (44 loc) · 931 Bytes
/
webpack.test.config.js
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
var path = require('path')
var webpack = require('webpack')
module.exports = {
entry: './test/unit/specs/index.js',
output: {
path: path.resolve(__dirname, '../test/unit'),
filename: 'specs.js'
},
resolve: {
alias: {
src: path.resolve(__dirname, '../src')
}
},
module: {
loaders: [
{
test: /\.js$/,
loader: 'babel',
// NOTE: use absolute path to make sure
// running tests is OK even if it is in node_modules of other project
exclude: [
path.resolve(__dirname, '../test/unit'),
path.resolve(__dirname, '../node_modules')
]
}
]
},
babel: {
loose: 'all',
optional: ['runtime']
},
plugins: [
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"development"'
}
})
],
devServer: {
contentBase: './test/unit',
noInfo: true
},
devtool: 'source-map'
}