When trying to import the vars from a file that is defining the tokens (using a .stylex.ts file) seems to break things, I get the error of Only static values are allowed inside of a stylex.create() call.
Steps to reproduce
Install the StyleX Astro integration
Follow steps to configure it
Create a vars.stylex.ts file, with a named export for defineVars
Try to import it and use it inside of stylex.create
This should throw the error mentioned.
Enviroment
Node v20.5.1 (I have no tried on any other versions).
NextJS 14.0.1 (this is the only version I have tried).
Thanks for reporting! I would've thought it works out of the box but apparently it needs a configuration option to be set. I can release the fix today.
The Problem
When trying to import the vars from a file that is defining the tokens (using a .stylex.ts file) seems to break things, I get the error of
Only static values are allowed inside of a stylex.create() call.
Steps to reproduce
This should throw the error mentioned.
Enviroment Node v20.5.1 (I have no tried on any other versions). NextJS 14.0.1 (this is the only version I have tried).