-
Notifications
You must be signed in to change notification settings - Fork 27.1k
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
next/dynamic Resulting in style loss #47655
Comments
I think we've run into the same issue, but on Next 12 with Linaria. We found that all the style sheets are in the head, but only with rel="preload" so we made a "workaround" by adding this as a script in _document.tsx
This makes the browser load the scripts as it should, but is clearly not a good solution to this. |
i made something similar, but on router events callback |
This is still an open issue for us ! |
Hey everyone, sorry for the long delay, and thank you for your patience. The fix has been landed at PR #72959, release v15.0.4-canary.32, so feel free to try it, and let me know if it doesn't work for you. We are expecting to release this in the next release. Thank you! |
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Verify canary release
Provide environment information
Which area(s) of Next.js are affected? (leave empty if unsure)
Dynamic imports (next/dynamic)
Link to the code that reproduces this issue
https://github.com/hyj111/next-dynamic-css-issue
To Reproduce
If a css module in a lazy load component is referenced in advance, the packaged code will cause the lazy load component style to be lost, but it is normal under dev
Describe the Bug
You can use the code of this warehouse to reproduce
https://github.com/hyj111/next-dynamic-css-issue
Expected Behavior
The style of the lazy loading component can be loaded normally
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
next start
The text was updated successfully, but these errors were encountered: