Skip to content

Instantly share code, notes, and snippets.

@mkalish
Created March 2, 2017 19:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mkalish/c1acffbe2ec349efbbabb076f346d297 to your computer and use it in GitHub Desktop.
Save mkalish/c1acffbe2ec349efbbabb076f346d297 to your computer and use it in GitHub Desktop.
This configuration will not trigger a refresh when the hot update is applied.
module.exports = {
entry: {
hot: ['react-hot-loader/patch', 'webpack-dev-server/client?https://localhost:3000', 'webpack/hot/only-dev-server'],
main: 'src/index.js'
},
output: {
path: __dirname + '/dist/assets',
filename: '[hash]-[name].js',
library: 'ReactApp'
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new HtmlWebpackPlugin({
chunks: ['hot', 'main'],
template: 'local-index.hbs'
}),
new DashboardPlugin(),
new webpack.EnvironmentPlugin({
NODE_ENV: 'development',
HOST_NAME: `${hostname}`
})
],
devServer: {
colors: true,
https: true,
quiet: false,
port: 3000,
hot: true,
stats: {colors: true},
proxy: useApiKey ? proxyApiConfig : proxyLoginConfig
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment