HorusGoul / vite-plugin-stylex

Vite Plugin for StyleX
MIT License
119 stars 13 forks source link

Build stylex in production mode with non-production vite mode #42

Closed olivierpascal closed 8 months ago

olivierpascal commented 8 months ago

I would like to build stylex in production mode with an arbitrary mode (ie. vite build --mode staging).

Today it is not possible:

https://github.com/HorusGoul/vite-plugin-stylex/blob/ce2e330df0f5e2cadf63f5a9d145274a5ee48154/packages/vite-plugin-stylex/src/index.mts#L138-L142

HorusGoul commented 8 months ago

Thanks for the report! This should check that we're running Vite with the build command instead.

Sparkmasterflex commented 8 months ago

That did it. Thanks!