Anber / wyw-in-js

MIT License
191 stars 8 forks source link

Add possibility to disable the vendor prefixer (Vite) #77

Open functionalDev opened 2 months ago

functionalDev commented 2 months ago

Describe the feature

Adding the option to disable vendor prefixes for the generated css. The default stylis-preprocessor always adds vendor prefixes to the css.

Motivation

Serve less CSS. AMP (accelerated mobile pages) have a limit to the css they are allowed to contain. Removing vendor prefixes was one way we reduced our css with styled component.

Possible implementations

You already did a great job making everything flexible and almost everything is already in place. You just need to accept the flag prefixer in the plugin, pass it in to the transform function and align some types