easy-team / egg-react-webpack-boilerplate

Egg React Server Side Render(SSR) / Client Sider Render(CSR)
https://easyjs.cn/egg-react
MIT License
671 stars 93 forks source link

How to hot reload with SPA? #7

Closed nvsky closed 6 years ago

nvsky commented 6 years ago

`Ignored an update to unaccepted module ./app/web/component/spa/redux/app.js -> ./app/web/page/spa/redux.jsx -> 6

[HMR] The following modules couldn't be hot updated: (Full reload needed) This is usually because the modules which have changed (and their parents) do not know how to hot reload themselves. See https://webpack.js.org/concepts/hot-module-replacement/ for more details.

[HMR] - ./app/web/component/spa/redux/app.js`

nvsky commented 6 years ago

solution?http://hubcarl.github.io/blog/2017/04/15/egg-webpack/

hubcarl commented 6 years ago

@nvsky 请参考 egg-react-webpack-boilerplate/app/web/framework/entry/client-loader.js 实现。因为 骨架项目是通过模板实现的,模板里面统一做了处理。 SPA里面没有加这个逻辑,你可以在入口地方参考这个实现加上即可。

nvsky commented 6 years ago

@hubcarl 感谢指引,按你思路我实现下