-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
47 lines (44 loc) · 990 Bytes
/
webpack.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
47
var path = require('path');
var webpack = require('webpack');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var loaders = require('./webpack.loaders');
var config = require('./src/configs/main');
var postCssConfig = require('./postcss.config');
var PATH_BUILD = path.join(__dirname, 'build');
var NODE_ENV = process.env.NODE_ENV;
module.exports = {
entry: [
'./src/entry.jsx',
],
devtool: config.WEBPACK_DEVTOOL,
output: {
publicPath: '/',
path: PATH_BUILD,
filename: 'bundle.js'
},
resolve: {
extensions: ['.js', '.jsx', '.css']
},
module: {
loaders: loaders,
},
devServer: {
contentBase: "./public",
hot: true,
inline: true,
port: config.PORT,
host: config.HOST,
stats: {
assets: false,
colors: true,
version: false,
hash: false,
timings: true,
chunks: true,
chunkModules: false
},
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
]
};