since 9.5.3 ( in 9.5.2 works fine), the custom error page has broken styles
using sass to styling
create custom error page _error.jsx (tsx in my case)
need to build to see the actual error page, and try to create an error
(yarn build && yarn start)
in the error page the global style works fine
but every module.scss is broken even for the main error page or for imported components
Hi, the same for me.
Here's example app to reproduce. I hope this helps you.
In trying to debug this locally I can see that none of the paths provided to getCssLinks
contain paths to css files from css modules:
Tracing back I can see this line in getDocumentFiles
, which looks like it could be a good candidate for the cause of the problem:
but that line was changed 2 months ago in https://github.com/vercel/next.js/commit/9fcf39acd45966d8a6c362bec62e49a53dcd8581. Tracing back further we reach getPageFiles
, the last change there was https://github.com/vercel/next.js/commit/3597978d7f121f11df99cd7cd757e1eb9868fff7 to "Modify low priority files in manifest", _possibly_ whatever is going on in here could be the cause? The intent is hard to determine but these amends _may_ have broken the contract for the data needed to get the CSS paths?
Link here to the diff where the above was introduced in commit 3597978
There is a workaround here: https://github.com/vercel/next.js/discussions/16784#discussioncomment-82053
Most helpful comment
Hi, the same for me.
Here's example app to reproduce. I hope this helps you.
https://github.com/TasukuUno/repro-nextjs-16931