-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.hot.config.js
More file actions
34 lines (32 loc) · 873 Bytes
/
webpack.hot.config.js
File metadata and controls
34 lines (32 loc) · 873 Bytes
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
var path = require('path');
var webpack = require('webpack');
var config = require('./webpack.config');
module.exports = Object.assign({}, config, {
entry: [
'react-hot-loader/patch',
'webpack-dev-server/client?http://localhost:8080',
'webpack/hot/only-dev-server',
path.join(__dirname, 'frontend', 'entry.js')
],
output: {
filename: 'bundle.js',
path: path.join(__dirname, 'app', 'assets', 'javascripts'),
publicPath: 'http://localhost:8080/javascripts/'
},
devServer: {
publicPath: '/javascripts/',
headers: { "Access-Control-Allow-Origin": "*" },
host: "localhost",
port: 8080,
historyApiFallback: true,
hot: true,
inline: true
},
plugins: [
...config.plugins,
new webpack.HotModuleReplacementPlugin(),
new webpack.NamedModulesPlugin(),
new webpack.NoEmitOnErrorsPlugin(),
]
});
1