-
I may have run into another issue when dealing with Vite(? possibly?) and the way Vite uses Rollup? Not sure yet. Thought I'd check in on a couple of things. So I have added some tokens to my component library,
Paired with
I am using one color var in my Button component as a test. Everything works fine in the component library. Any suggestions where to start? Happy to provide any more information. Also think it's high time I get a public repo set up to share all my woes with :-) |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
Made some public repos/package. Component library that uses React Aria Components starter kit (Tailwind version) that I am converting to Stylex. So far only Button component has been converted. Example Remix-Vite app that imports the above component library. |
Beta Was this translation helpful? Give feedback.
-
This isn't reflected in the above repos, but I tried doing something similar to Stylex's repo. I took my token files and placed them into a workspace in the parent repo. Published them as their own package (no bundling, the files remain as is). The component library now imports from |
Beta Was this translation helpful? Give feedback.
-
Ah, I needed to add each file to the vite.config
etc |
Beta Was this translation helpful? Give feedback.
I have updated the repositories to use the new token setup of
Should also mention that if you are using @HorusGoul Vite plugin, you need to add the component library and the tokens to the
libraries
key. See the Vite config file in the example Vite App repoI think there as been a lot of specific config wrangling to get this to work with Vite, and I am super grateful for the Vite plugins that …