Open garronej opened 1 year ago
I have the same problem. not only js file.
import backgroundSource from './assets/grid.png';
// http://localhost:4200/_next/static/media/grid.1e100b25.png => 404 Not found
It is worked on next@13.0.6
. After upgrade to next@13.1.0
. It is broken.
I have the same problem but with pages
folder.
Devtools in browsers warns that src
prop does not match Server src
prop.
Warning: Prop `src` did not match. Server: "/_next/static/wp/test.9cb0ac20b5931c36.js"
Client: "/_next/static/wp/test.e0986f563dd5877b.js"
I believe this is the root of the problem, not sure what to do from here.
Verify canary release
Provide environment information
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://github.com/garronej/react-dsfr-next-appdir-demo
To Reproduce
Describe the Bug
When importing
.js
file as an url:(assuming
next.config.js
have been configured correctly)The console logs something that looks good:
But it gives a 404.
Expected Behavior
No 404
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response