Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fb5149b

Browse files
author
Lynx Zhou
authored
fix: remove hot-module-replacement in production mode (SimulatedGREG#737)
Remove hot-module-replacement related code from the bundled file in the production mode
1 parent e6a0324 commit fb5149b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

template/.electron-vue/webpack.renderer.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ let rendererConfig = {
150150
? path.resolve(__dirname, '../node_modules')
151151
: false
152152
}),
153-
new webpack.HotModuleReplacementPlugin(),
154153
new webpack.NoEmitOnErrorsPlugin()
155154
],
156155
output: {
@@ -173,6 +172,7 @@ let rendererConfig = {
173172
*/
174173
if (process.env.NODE_ENV !== 'production') {
175174
rendererConfig.plugins.push(
175+
new webpack.HotModuleReplacementPlugin(),
176176
new webpack.DefinePlugin({
177177
'__static': `"${path.join(__dirname, '../static').replace(/\\/g, '\\\\')}"`
178178
})

0 commit comments

Comments
 (0)