Anber / wyw-in-js

MIT License
191 stars 8 forks source link

Feature(vite): the plugin applies transforms only if `.cssText` is present #27

Closed layershifter closed 5 months ago

layershifter commented 7 months ago

Environment

Description

Current implementation of the plugin will force exit if cssText is empty:

https://github.com/Anber/wyw-in-js/blob/d92d4db45e672210bf82a3284edf1e28a18df77d/packages/vite/src/index.ts#L166

This makes a lot of sense for Linaria, however with Griffel we would like to have CSS extraction optional. Due the condition, even if transform happens, it will not be applied:

image