next.js
next.js copied to clipboard
Astroturf css template broken after v9.0.3
Bug report
Describe the bug
Using css template to define styles with astroturf stopped working in [email protected]
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
- Go to example
with-astroturf - Change
styled.buttonto:
const s = css`
.button {
color: black;
border: 1px solid black;
background-color: white;
&.primary {
color: blue;
border: 1px solid blue;
}
&.color-green {
color: green;
}
}
`
- See error
[ wait ] compiling ...
[ error ] ./pages/index-s.css
AstroturfLoaderError: /Users/murdock/lab/sandbox/next.js/examples/with-astroturf/pages/index-s.css: Unexpected token (2:2)
1 |
> 2 | .button {
| ^
3 | color: black;
4 | border: 1px solid black;
5 | background-color: white;
ModuleBuildError: Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/astroturf/loader.js):
AstroturfLoaderError: /Users/murdock/lab/sandbox/next.js/examples/with-astroturf/pages/index-s.css: Unexpected token (2:2)
Expected behavior
Styles should be compiled without any errors
Screenshots

If applicable, add screenshots to help explain your problem.
System information
- OS: macOS
- Version of Next.js: v9.0.5
Additional context
- I didn't test in a project without Typescript
- At version v9.0.2 it was working with no errors
Closing as no pr was opened.
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.