-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
前端页面热更新无效! #11
Labels
Comments
同问 |
@Stanlous @muzi131313 egg-webpack 需要增加如下配置 // ${root}/config/config.local.js
config.webpack = {
hot: true
} |
@muzi131313 你的改了hot: true就ok了么,我这边貌似没启效果,是因为webapck4么 |
Closed
单独使用 egg-webpack 时,需要在webpack 的 entry 加上 https://github.com/webpack-contrib/webpack-hot-middleware 配置 webpack-hot-middleware/client |
我写了个示例,有需要的朋友可以参考:https://github.com/keenwon/Egg-Webpack-Starter |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
单独使用egg-webpack,修改前端页面文件,webpack自动编译了,但是没有热更新,前端页面没有自动更新修改。
情况一:只使用koa-webpack-dev-middleware和koa-webpack-hot-middleware,修改前端页面文件,webpack自动编译了,而且自动热更新前端页面。
热更新有效!
egg里的app.js内容如下:
情况二:删除上面的app.js,只启用egg-webpack(按照README.md里的说明),修改了前端页面文件,webpack自动编译了,但没有热更新前端页面。
热更新无效!
{app_root}/config/config.default.js
The text was updated successfully, but these errors were encountered: