Webpack - [HMR] Hot Module Replacement is disabled
Ater run npm run dev , http://localhost:8080/ there is nothing display in the browser and the console log show exception Hot Module Replacement is disabled
The solution:
In package.json script section dev config add option : --inline --hot
"scripts": { "build": "webpack", "dev": "webpack-dev-server --devtool eval --progress --inline --hot --colors --content-base build", "test": "echo \"Error: no test specified\" && exit 1" },
In Webpack.config.js module section add :
plugins: [new webpack.HotModuleReplacementPlugin()]
相关推荐
不知道该写啥QAQ 2020-11-12
webfullStack 2020-11-09
Yvettre 2020-09-15
想做大牛的蜗牛 2020-10-30
gloria0 2020-10-26
gaojie0 2020-09-11
SelinaChan 2020-08-14
不知道该写啥QAQ 2020-08-09
gloria0 2020-08-09
不知道该写啥QAQ 2020-08-02
hline 2020-07-29
SelinaChan 2020-07-28
wangdianyong 2020-07-23
webpackvuees 2020-07-23
yqoxygen 2020-07-20
不知道该写啥QAQ 2020-07-18
waterv 2020-07-18
81463166 2020-07-17