Assets url resolution in CSS is different between build and dev (Turbopack) #76047
Labels
CSS
Related to CSS.
linear: turbopack
Confirmed issue that is tracked by the Turbopack team.
Turbopack
Related to Turbopack with Next.js.
Link to the code that reproduces this issue
https://codesandbox.io/p/devbox/recursing-murdock-stq8td
To Reproduce
~
Current vs. Expected behavior
Turbopack supports only
url('@/path/to/asset.svg')
syntax.Otherwise returns error
Module not found: Can't resolve '~@/path/to/asset.svg'
Webpack supports only
url('~@/path/to/asset.svg')
syntax.Otherwise returns error
Module not found: Can't resolve './@/path/to/asset.svg'
A possible workaround is to set in
next.config.ts
and use
~@
syntax.Provide environment information
Which area(s) are affected? (Select all that apply)
CSS
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
No response
The text was updated successfully, but these errors were encountered: