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

Ability to disable CSS minification if needed #617

Closed
chopfitzroy opened this issue May 14, 2020 · 5 comments
Closed

Ability to disable CSS minification if needed #617

chopfitzroy opened this issue May 14, 2020 · 5 comments

Comments

@chopfitzroy
Copy link

Looking at #121 if compress is true then CSS is minified by default (which includes minification of class names.

This can prove and issue if you want to export the CSS and use it somewhere else, would it be possible to have a separate flag to explicitly toggle CSS minification?

Cheers.

@maraisr
Copy link
Contributor

maraisr commented May 14, 2020

I think the minification of class names is a side effect issue with the work i did to add css-modules.

Think fundamentally it was a problem with rollup postcss.

See: #370 (comment)

I can see its affecting people; Ill push a PR their way to fix this.

@katywings
Copy link
Collaborator

This is actually related to css modules, not cssnano :).

Its a bug in rollup-plugin-postcss: egoist/rollup-plugin-postcss#281

As a workaround you can just disable css-modules if you don't use them: --css-modules false

@BadMask121
Copy link

BadMask121 commented Aug 16, 2020

This helped fix the issue of css minification changing classname but css file still dont get imported when js file built @katywings

@katywings
Copy link
Collaborator

@BadMask121 This issue here is related to css minification / css modules. What you are describing sounds like a different problem, therefore I recommend you to open up a seperate issue. If you do create another issue, please also add a reproduction repository! (:

ajitid pushed a commit to ajitid/react-griddy that referenced this issue Sep 7, 2020
@developit developit added the CSS label Dec 18, 2020
@developit
Copy link
Owner

--compress false and --no-compress will now disable CSS minification in Microbundle 0.13.

@developit developit added this to the 0.13.0 milestone Dec 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants