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

whistle 怎么支持 webpack 热更新 ? #965

Open
DaphnisLi opened this issue Aug 22, 2023 · 9 comments
Open

whistle 怎么支持 webpack 热更新 ? #965

DaphnisLi opened this issue Aug 22, 2023 · 9 comments

Comments

@DaphnisLi
Copy link

No description provided.

@avwo
Copy link
Owner

avwo commented Aug 22, 2023

默认就支持

@DaphnisLi
Copy link
Author

试了下,不支持。是我配置有问题吗,大佬能帮看下吗

@avwo
Copy link
Owner

avwo commented Aug 23, 2023

你这个是调试 whistle 代码,还是通过 whistle 转发页面请求到 webpack?

@DaphnisLi
Copy link
Author

你这个是调试 whistle 代码,还是通过 whistle 转发页面请求到 webpack?

是将本地的代码代理到线上进行调试,本地代码代理是ok的,但是修改代码后,webpack 热更新没用,只是本地重新构建了,页面没发生变化

@avwo
Copy link
Owner

avwo commented Aug 23, 2023

抓包看下请求有没有发出去,有没有响应?

@DaphnisLi
Copy link
Author

抓包看下请求有没有发出去,有没有响应?

热更新时抓到了这几个

image

@avwo
Copy link
Owner

avwo commented Aug 23, 2023

用 chrome 抓包看看页面发出哪些请求

@sedationh
Copy link

@DaphnisLi
先在 localhost 下看看你热更新的请求情况,再根据请求情况配置热更新匹配规则
First look at your HMR request under localhost, and then configure the HMR matching rule according to the request situation


such as

^https://xxx.net/***hot-update*** http://127.0.0.1:9966/$1hot-update$2

@chiyu1996
Copy link

似乎是chrome修改了SSL规则,导致跟本地的webpack-dev-server 建立websocket链接失败 Failed to load resource: net::ERR_SSL_PROTOCOL_ERROR

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

4 participants