webpack自动刷新问题
来源:5-4 webpack热加载配置(下)
jeanneze
2017-05-10
无论使用webpack-dev-server还是webpack-dev-server --inline --hot都无法同步刷新
package.json文件内容如下:
{
"name": "baojin",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Jeanne",
"license": "ISC",
"dependencies": {
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babelify": "^7.3.0",
"react": "^15.5.4",
"react-dom": "^15.5.4",
"webpack": "^2.5.1",
"webpack-dev-server": "^2.4.5"
},
"devDependencies": {
"babel-loader": "^7.0.0"
}
}
写回答
1回答
-
React 使用 webpack2 配置自动刷新的项目模板,我上传代码到 github 上了,你可以直接下载了参考,我测试完全没问题了。
https://github.com/ParryQiu/React-Webpack2-HMR-Template
012017-05-13
相似问题