-
-
Notifications
You must be signed in to change notification settings - Fork 384
"no window.document found, will not HMR CSS" when emit=false #943
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
Comments
You need to use different setup for server and client, but you miss |
I do use different setup for server - I set emit = false as described here: https://github.com/webpack-contrib/mini-css-extract-plugin#emit. I still need the css stuff to run so the classnames are set properly to enable hydration |
Sorry missed you already done it, thanks |
Just intresting do you expected to reload CSS (it is possible too) or just avoid message? |
Just to avoid the message... I believe the only reason it thinks HMR is running on server is because I'm using webpack-dev-server with hot = true and it's injecting the HMR stuff into entrypoint for both client and server bundle. However, that client code doesn't cause any problems itself; just that it seems to be triggering this console message |
FYI: landed the branch to master so it's deleted now: https://github.com/ntucker/anansi/tree/25803a5b49316c7e73846efbe774d5cbe3eb28a3 |
I think we can improve check here, do you want to send a PR? |
@alexander-akait done: #953 |
Bug report
When using webpack devserver with a server and client bundle where the server bundle
Actual Behavior
"no window.document found, will not HMR CSS" is output to the console
Expected Behavior
Since emit = false, there is no need to attempt HMR anyway so simply ignore this
How Do We Reproduce?
Please paste the results of
npx webpack-cli info
here, and mention other relevant informationThe text was updated successfully, but these errors were encountered: