forked from prateeknegi/digital-receipt-web-react-redux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
51 lines (49 loc) · 1.2 KB
/
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
48
49
50
51
'use strict';
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry : [
'webpack-dev-server/client?http://localhost:8080',
'webpack/hot/only-dev-server',
'./client/receipt_app.js'
],
output: {
path: './build',
filename: 'receipt_bundle.js'
},
resolve: {
extensions: ['', '.js', '.jsx']
},
plugins: [
new webpack.optimize.OccurenceOrderPlugin(true),
new HtmlWebpackPlugin({ template: './client/index.html', inject: true }),
new webpack.HotModuleReplacementPlugin()
],
module: {
loaders: [{
test: /\.js?$/,
loader: 'react-hot!babel-loader',
exclude: /node_modules/
}]
}, // Our Webpack Development Server config
devServer: {
inline: true,
progress: true,
historyApiFallback: true,
hot: true,
stats: {
// Config for minimal console.log mess.
assets: false,
colors: true,
version: false,
hash: false,
timings: false,
chunks: false,
chunkModules: false,
errors: true,
errorDetails: true,
warnings: false
},
watchOptions: { aggregateTimeout: 300, poll: 1000 }
}
};