forked from sushkamath/test-js-sushanth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
36 lines (35 loc) · 896 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
const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: [
'webpack-dev-server/client?http://localhost:5000', // WebpackDevServer host and port
'webpack/hot/only-dev-server', // "only" prevents reload on syntax errors
'./src/client-entry.js' // app entry point
],
output: {
path: './build',
publicPath: '/',
filename: 'client.bundle.js',
},
module: {
loaders: [
{test: /\.jsx?$/, loaders: ['react-hot', 'babel'], include: path.join(__dirname, 'src')}
]
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new HtmlWebpackPlugin({
template: './src/index.ejs'
})
],
devServer: {
contentBase: '/build/',
historyApiFallback: {
index: 'index.html',
},
hot: true,
port: 5000,
noInfo: true
}
}