-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.dev.config.js
46 lines (44 loc) · 998 Bytes
/
webpack.dev.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
46
'use strict';
var webpack = require('webpack');
var path = require('path');
var baseConfig = require('./webpack.config');
var assign = require('lodash/assign');
module.exports = assign({}, baseConfig, {
debug: true,
bail: false,
devServer: {
hot: true,
contentBase: 'build',
progress: true,
quiet: false,
noInfo: false,
stats: {
// Configure the console output
colors: true,
assets: true,
version: false,
hash: false,
timings: true,
chunks: false,
chunkModules: false
},
headers: {
'Access-Control-Allow-Origin': '*'
}
},
module: {
loaders: baseConfig.module.loaders.map(function(loader) {
if (loader.test.toString() === /\.jsx?$/.toString()) {
loader.loader = 'react-hot!' + loader.loader;
}
return loader;
})
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('development'),
'API_HOST': JSON.stringify('')
})
].concat(baseConfig.plugins)
})