Turbopack only issue: Pseudo-elements like '::before' or '::after' can't be followed by selectors like 'Delim('.')' #76180
-
SummaryI am trying to enable turbopack for an existing project of mine, its importing a large minified css file and when i start the dev server i get the following error: Pseudo-elements like '::before' or '::after' can't be followed by selectors like 'Delim('.')' at [project]/src/app/globals.css:43:8 You can reproduce this by bootstrapping a new nextjs 15 project with turbopack and add the following CSS to globals.css: ::after .selector {
display: none;
} I'm not entirely sure this is a valid selector but my question is... why is turbopack more strict about this and is there a fix other than addressing the issue with the imported css? Additional informationNo response ExampleNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Turbopack is more strict about CSS syntax because it's designed for performance optimizations and correctness. |
Beta Was this translation helpful? Give feedback.
Turbopack is more strict about CSS syntax because it's designed for performance optimizations and correctness.
The error occurs because the selector ::after .selector is invalid in CSS