Open finnan444 opened 1 month ago
I came across the same issue you have reported here. There is a workaround for this until Next is able to apply a fix. You can add a custom postcss config that uses the postcss-import
plugin.
Install the postcss-import
plugin as a dependency to your project npm i --save-dev postcss-import
Add a postcss.config.json
file to the root of your project with the following:
{
"plugins": [
"postcss-import"
]
}
Reference - https://nextjs.org/docs/pages/building-your-application/configuring/post-css#customizing-plugins
Link to the code that reproduces this issue
https://github.com/finnan444/nextjs-error-postcss-layer
To Reproduce
.foo {color: red}
)@import 'frame.css'
next dev
.foo {color: red}
)@import 'frame.css' layer(frame);
Current vs. Expected behavior
Following the steps of previous selection i expect the layout.css to have
I suppose there is some problem with postcss-import-parser
Provide environment information
Which area(s) are affected? (Select all that apply)
Not sure
Which stage(s) are affected? (Select all that apply)
next dev (local), next build (local)
Additional context
No response