-
Notifications
You must be signed in to change notification settings - Fork 3
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
Tweak config to support HMR #107
Conversation
94fc140
to
da4a990
Compare
This should be ready to test. Don't forget to download and enable to HMREnabler app for the server. "serve": "NODE_ENV=development webpack serve --progress --config webpack.js", |
d5308a7
to
104edd5
Compare
5f444fb
to
4572f04
Compare
This is still missing the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to be fetching https for me, because my dev instance have a certificate. But the webpack serve only listens to http 🤔
Setting up https: false
in the DevServer does not works
https://webpack.js.org/configuration/dev-server/#devserverhttps
Yes,I wasn't sure it was necessary to add it as Webpack install it dynamically on the first |
It might be due to the |
Since this is a required dep for this lib to work with 100% of its features, we need it as dep and peer dep :) |
8b1d815
to
e5a07ef
Compare
I think it's because my dev setup have a domain, the HMR_enabler doesn't fix the CSP for same-domain request, no?
|
The problem here is that the Webpack devServer block requests coming from other web pages. This prevent say The solution is to:
We could also use a shell environment variable by setting |
Tried this, did not work :/ |
So, I was able to reproduce your error. It was due to Webpack using https to communicate but as it wasn't listening with https enabled, the requests failed. I pushed a solution to force Webpack to use http. This is the line that say The other problem I reported still stand as you will notice. The current solution is to set an environment variable when running the dev server, but I don't think that is the best. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small comment regarding the environment variable, otherwise this works fine for me in deck with a limitation:
There seems to be an issue with multiple entrypoints that might be loaded from the same app that runs in hot reload mode which then causes the update to be not properly detected, but I'd consider that not as a blocker for now.
Really nice so far 👍
1a3740a
to
11a82da
Compare
Signed-off-by: Louis Chemineau <louis@chmn.me>
11a82da
to
e90ff5e
Compare
Tweak the Webpack config to support hot module reloading.
web
(needed because of that: HMR/Live Reloading broken after Webpack 5 rc.0 -> rc.1 update webpack/webpack-dev-server#2758).publicPath
so HMR knows where to fetch updates. This can be Tweak config to support HMR #107 (comment) as stated in the readme.devServer
.