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

clean-css @ level-2 changes the css to much in some cases. Please make it's use configurable. #936

Closed
MariusKarthaus opened this issue Oct 21, 2020 · 1 comment

Comments

@MariusKarthaus
Copy link

The use of clean-css is hardcoded in 'buildPluginCss.js' for level-2 minification of the css in production build. Currently these optimizations are changing the semantics of my style sheet. I've submitted a bug report here:

clean-css/clean-css#1128

There currently exists no way (that I could find) to configure this apart from disabling minification for the whole project including javascript etc.

Would it be possible to move this minification step outside of the vite code and into the postcss configuration? Or alternatively get some finer grained control via the vite config?

Regards,
Marius

@Jaeiya
Copy link

Jaeiya commented Jan 4, 2021

I have a similar issue with a base64 encoded font. The encoded string contains // and the minification fails because of it. I also have my own CSS minification done with cssnano; I don't need any other library doing extra minification. Seeing as Vite 2.0 is now framework agnostic, it doesn't make sense for any coupled build tools to be hardcoded without the ability to configure them for your own environment. I imagine it's just an oversight that this particular tool can't be configured.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants