-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.test.js
45 lines (44 loc) · 1.18 KB
/
webpack.config.test.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');
//TODO: use IgnorePlugin for css/scss
module.exports = {
module: {
loaders: [
{
test: /\.jsx?$/,
loader: 'babel',
exclude: /node_modules/
},
{
test: require.resolve('jquery'),
loader: 'expose?$!expose?jQuery'
},
{
test: /\.json$/,
loader: 'json'
}
],
noParse: [
/\/sinon.js/
]
},
plugins: [
new webpack.IgnorePlugin(/\.(css|scss)$/)
],
resolve: {
extensions: ['', '.js', '.jsx'],
alias: {
'@pages': path.resolve(__dirname, './app/pages'),
'@common': path.resolve(__dirname, './app/common/index'),
'@utils': path.resolve(__dirname, './app/utils'),
'@fixtures': path.resolve(__dirname, './test/fixtures'),
sinon: 'sinon/pkg/sinon'
}
},
devtool: '#source-map',
externals: {
cheerio: 'window',
'react/lib/ExecutionEnvironment': true,
'react/lib/ReactContext': true
}
};