-
Notifications
You must be signed in to change notification settings - Fork 27.8k
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
CSS modules not working in /app/not-found.tsx
#48133
Comments
Me also had the same experience , the new 'not-found.js' file is full of bugs , link is broken , css modules being not loaded . |
Can confirm this as well. Importing the Edit: I sorta worked around it by using a separate route for 404 and redirecting all the "not found" throws to it. |
When using the `not-found.js` file to match missed routes, `serverCSSForEntries` will always be empty as the `ComponentMod.pages` itself doesn't contain any actual entry. We need to handle that as a special case. Closes #48133.
This closed issue has been automatically locked because it had no new activity for a month. 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
Operating System: Platform: linux Arch: x64 Version: #22 SMP Tue Jan 10 18:39:00 UTC 2023 Binaries: Node: 16.17.0 npm: 8.15.0 Yarn: 1.22.19 pnpm: 7.1.0 Relevant packages: next: 13.3.0 eslint-config-next: 13.2.4 react: 18.2.0 react-dom: 18.2.0
Which area(s) of Next.js are affected? (leave empty if unsure)
App directory (appDir: true)
Link to the code that reproduces this issue
https://codesandbox.io/p/sandbox/dark-microservice-lxq1q8?file=%2Fapp%2Fnot-found.tsx
To Reproduce
Click to
Go to 404
page.Describe the Bug
CSS modules do not apply in
not-found.tsx
Expected Behavior
CSS modules just work
Which browser are you using? (if relevant)
Chrome
How are you deploying your application? (if relevant)
next dev
The text was updated successfully, but these errors were encountered: