Disable hot reloading on production builds
derp
This commit is contained in:
parent
b0916a59f6
commit
f8adaed4a0
|
@ -5,7 +5,7 @@
|
|||
"main": "index.js",
|
||||
"scripts": {
|
||||
"build": "webpack",
|
||||
"build:production": "webpack -p --optimize-minimize",
|
||||
"build:production": "ENVIRONMENT=production webpack -p --optimize-minimize",
|
||||
"watch": "webpack --progress --watch",
|
||||
"start": "node serve.js"
|
||||
},
|
||||
|
|
|
@ -5,6 +5,8 @@ const defines = {
|
|||
"DEFAULT_WS_URI": process.env.WEBSOCKET_URI || "ws://localhost:8412/"
|
||||
};
|
||||
|
||||
const env = process.env.ENVIRONMENT || "development";
|
||||
|
||||
module.exports = {
|
||||
devtool: "source-map",
|
||||
entry: [
|
||||
|
@ -50,10 +52,10 @@ module.exports = {
|
|||
]
|
||||
},
|
||||
plugins:[
|
||||
new webpack.HotModuleReplacementPlugin(),
|
||||
(env !== "production" && new webpack.HotModuleReplacementPlugin()),
|
||||
new webpack.EnvironmentPlugin(defines),
|
||||
new webpack.NamedModulesPlugin(),
|
||||
],
|
||||
].filter(p => p),
|
||||
resolve: {
|
||||
alias: {
|
||||
"react": "preact-compat",
|
||||
|
|
Loading…
Reference in New Issue
Block a user