HorusGoul / vite-plugin-stylex

Vite Plugin for StyleX
MIT License
110 stars 11 forks source link

rsc support ? #56

Closed advancedtw closed 3 months ago

advancedtw commented 3 months ago

I'm not sure what is the state of this plugin concerning RSC but I encountered a possible bug while trying to integrate vite-plugin-stylex with vinxi react RSC.

It works fine for spa and ssr (haven't tried in prod yet) but for some reason when I include vite-plugin-stylex in my rsc router import.meta is undefined and breaks the application.

Doesn't matter if it's stylex or react-strcit-dom I always get Cannot read properties of undefined (reading 'ROUTER_NAME') when import.meta.env.ROUTER_NAME is being accessed.

This is the example I'm using.