Javascript NextJS setup for Vanilla Extract #1552
-
QuestionIs it possible to get vanilla extract working in a NextJS project but under Javascript instead of Typescript? It's a fairly large codebase and would be a pain to move over to Typescript. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
TypeScript isn't a requirement to use Vanilla Extract. It should work fine in a JavaScript project, with the only difference being that you'd author your styles inside |
Beta Was this translation helpful? Give feedback.
-
Okay so for anyone else tackling this, I resolved my own issue. It turns out the All that to say, if anyone was facing the same issues as I was, just remove |
Beta Was this translation helpful? Give feedback.
Okay so for anyone else tackling this, I resolved my own issue. It turns out the
--turbopack
flag is on by default innpm run dev
and my hunch is sinceturbopack
is still not fully featured even though it was released for primetime, it lacks some support for things like vanilla extract.All that to say, if anyone was facing the same issues as I was, just remove
--turbopack
from thedev
script or turned off with some feature flag.