-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.test.config.js
More file actions
43 lines (38 loc) · 893 Bytes
/
webpack.test.config.js
File metadata and controls
43 lines (38 loc) · 893 Bytes
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
const webpack = require('webpack')
module.exports = {
context: __dirname + '/browser',
entry: [
'./test/setup.js',
],
module: {
loaders: [{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'react-hot!babel'
},
{
test: /\.json$/,
loader: 'json-loader'
},
]
},
resolve: {
extensions: ['', '.js', '.jsx']
},
output: {
path: __dirname + '/browser/test',
filename: 'test.spec.js'
},
externals: {
'react/lib/ExecutionEnvironment': true,
'react/addons': true,
'react/lib/ReactContext': 'window'
},
plugins: [
new webpack.optimize.CommonsChunkPlugin({
name: 'main', // Move dependencies to our main file
children: true, // Look for common dependencies in all children,
minChunks: 2, // How many times a dependency must come up before being extracted
}),
]
};