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

Use a better default browser list and fail gracefully when css parsing fails #3509

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

ealmloff
Copy link
Member

@ealmloff ealmloff commented Jan 7, 2025

This PR has three different fixes:

  1. Asset minification for CSS that lightning css doesn't parse. If lightning css fails, we log the error and fall back to the unminified css.

  2. Lightning css defaults to supporting only the newest browsers which was causing CSS minifier is cutting out some css attributes #3289. Instead this PR switches to the browserslist defaults (or the browserlist file in your project)

  3. It also fixes assets not being processed after hot reloading which can cause visual inconsistencies and makes debugging asset optimization difficult

Fixes #3372
Fixes #3289
Fixes #3471
Fixes #3310

@ealmloff ealmloff added bug Something isn't working cli Related to the dioxus-cli program labels Jan 7, 2025
Copy link
Member

@jkelleyrtp jkelleyrtp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Figured it'd be simple enough!

@jkelleyrtp jkelleyrtp merged commit 807cfd2 into DioxusLabs:main Jan 7, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli Related to the dioxus-cli program
Projects
None yet
2 participants