-
Notifications
You must be signed in to change notification settings - Fork 370
Description
Describe the issue
Hello,
After upgrading to the unplugin setup (using Vite) I've looked into assets produced by my app and spotted one thing - the styles part produced by StyleX weren't minified. So I wondered why does it happen and looked into the implementation. It seems like the output is manually appended to already built file, by either appending to its source or writing directly with fs module.
If I understand correctly, that's a bit of antipattern and is discouraged by e.g. Rollup:
Is it somehow possible to make it a part of standard bundle, so it's handled by minification and other parts of CSS building - e.g. down-leveling? Or was it some limitation/purposeful choice?
Or is the intended usage to handle everything via lightningcssOptions? That would require to mimic the pipeline from Vite over there 🤔
Expected behavior
CSS emitted by StyleX is part of normal CSS bundling in bundlers, it's minified and processed
Steps to reproduce
- Use the unplugin setup
- Build the app
Test case
No response
Additional comments
No response