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

Provide way to disable minification as Lightning CSS can break css when minified #241

Open
DanielJoyce opened this issue Jan 21, 2024 · 5 comments

Comments

@DanielJoyce
Copy link
Contributor

By default, release mode enables Lightning minification, but there are outstanding bugs where the transforms lightning uses can break CSS intention.

We might want a way to disable minification in release mode, or at least, only minimize whitespace and nothing else.

@DanielJoyce
Copy link
Contributor Author

Another option may be to look at swc-css-minifier which is not based on lightning.

@benwis
Copy link
Collaborator

benwis commented Jan 21, 2024 via email

@DanielJoyce
Copy link
Contributor Author

DanielJoyce commented Jan 21, 2024

Lightning has some issues with order of properties and I personally think the compression is over-eager, clobbering overrides. It doesn't preserve property order either.

SWC minifier is slower by about 4x, but still very fast.

I think a disable-minification switch is a quick first one, followed by maybe a option to use swc-css behind a feature flag.

@benwis
Copy link
Collaborator

benwis commented Jan 21, 2024 via email

@bematteo
Copy link

Having the same issue (I think?).
I tried putting @import "daisyui.full.min"; in my main.scss and the resulting style seems to be broken.
Works well if including from CDN.

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

No branches or pull requests

3 participants