Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
functionalDev opened this issue Apr 22, 2024 · 1 comment
Open

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

functionalDev opened this issue Apr 22, 2024 · 1 comment
Labels
feature: proposal 💬 New feature proposal that needs to be discussed needs: triage 🏷 Issue needs to be checked and prioritized

Comments

@functionalDev
Copy link

functionalDev commented Apr 22, 2024

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

@functionalDev functionalDev added the feature: proposal 💬 New feature proposal that needs to be discussed label Apr 22, 2024
@github-actions github-actions bot added the needs: triage 🏷 Issue needs to be checked and prioritized label Apr 22, 2024
@petr001
Copy link

petr001 commented Dec 4, 2024

Yep, prefixer is there, it's just not passed from higher functions and options object:

https://github.com/Anber/wyw-in-js/blob/main/packages/transform/src/transform/generators/createStylisPreprocessor.ts#L430

Vendor prefixes are obsolete, making CSS 25% bigger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: proposal 💬 New feature proposal that needs to be discussed needs: triage 🏷 Issue needs to be checked and prioritized
Projects
None yet
Development

No branches or pull requests

2 participants