-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.config.test.js
45 lines (44 loc) · 1.08 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');
module.exports = {
devtool: 'source-map',
entry:{
app:[
'babel-polyfill',
path.resolve(__dirname,'test/index.js')
]
},
output:{
path:path.resolve(__dirname, 'test'),
filename:'bundle.js'
},
devServer: {
historyApiFallback: true,
hot: true,
inline: true,
stats: { colors: true },
proxy: {
'/19634': {
target: 'http://rapapi.org/mockjsData/',
changeOrigin: true
}
}
},
module:{
loaders:[
{
loader:'babel',
exclude:[ path.resolve(__dirname,'node_modules') ],
include:[ path.resolve(__dirname,'test') ],
test:/\.(js|jsx)$/,
query:{
plugins:["transform-runtime"],
presets:['es2015','stage-0','react']
}
}
]
},
resolve:{
extensions: ['','.js','.jsx','.json']
}
};