Open
Description
I ran into an issue while using next-yak 4.1.0 with Node 22.13.1.
When trying to use JavaScript's String.prototype.repeat() method inside a styled component's template literal, the compiler throws a parsing error
Here's a minimal reproduction:
import { styled } from "next-yak";
const CompA = styled.div`
grid-template-columns: ${() => "1f".repeat(12)};
`;
This results in the error:
Error: × Could not parse member expression
╭─[app/page.tsx:4:1]
1 │ import { styled } from "next-yak";
2 │
3 │ const CompA = styled.div`
4 │ grid-template-columns: ${() => "1f".repeat(12)};
· ───────────
5 │ `;
This should be valid code since it's a runtime expression that generates a CSS value
Environment:
- next-yak: 4.1.0
Activity