Skip to content
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

需要自己实现render拦截,然后读取memoryFile吗 #13

Closed
fhyoga opened this issue Aug 14, 2018 · 1 comment
Closed

需要自己实现render拦截,然后读取memoryFile吗 #13

fhyoga opened this issue Aug 14, 2018 · 1 comment

Comments

@fhyoga
Copy link

fhyoga commented Aug 14, 2018

按照文档来配置,发现webpack服务起来以后,ctx.render还是读取的磁盘的html,没有插入打包后的script标签。现在我是自己写的一层中间件把返回的ctx.body用readWebpackMemoryFile('/game/entry.html')暴力替换掉。

正常的解决方案是自己实现一个render方法吗?还是我没用对这个插件?

谢谢

@fhyoga
Copy link
Author

fhyoga commented Aug 15, 2018

__webpack_hmr这个请求没代理,热更新还是要手动刷新浏览器吧?文档写的太精简了,全靠自己读源码。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant