-
Notifications
You must be signed in to change notification settings - Fork 261
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
希望在example中能添加一个热更新的最佳案例 #99
Comments
className 修改后,热更新肯定是生效了的,样式有关的热更新问题是 css 无法热替换导致的,这是 使用了 可以考虑升级到 mini-css-extract-plugin,后者有提供HMR的计划 webpack-contrib/mini-css-extract-plugin#34 |
dev模式下: |
增加配置参数,判断是否使用 extract-text-plugin,这个实现起来没什么难度。 但是会额外提高理解成本,并且页面模板也需要区分 dev,判断是否 link css文件,这部分是要用户自己修改的。dev和线上相当于是两套逻辑,也会有不可预知的风险存在 |
嗯。所以next.js自己封装了 |
react-hot-loader 已经生效,但是还是有些地方不方便
实际在开发同构渲染项目,感觉热更新还是有些不好使,开发效率很容易降低,具体体现在:
似乎对服务端已渲染后节点,添加className, 客户端会仍然选择服务端渲染顺序的样式
The text was updated successfully, but these errors were encountered: