-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Remove unused classnames #472
Comments
One straight-forward optimization here would be to not apply the |
tbh #497 is plenty for where we are at right now. Anything more I think would require the ability to really parse your CSS, which I know @drwpow had mentioned wanting to avoid for now. A reminder for anyone concerned about perf: a reused classname gzips REALLY well. This probably has less affect on loading perf than you'd think, especially once #497 is merged. |
* feat(#472): do not inject `astro-xxx` class for components without styles * test: add test for skipped scoped classes * chore: add changeset * Update happy-cougars-scream.md
…astro#497) * feat(withastro#472): do not inject `astro-xxx` class for components without styles * test: add test for skipped scoped classes * chore: add changeset * Update happy-cougars-scream.md
What is Missing from Astro Today?
Remove unused classnames (ie. astro-feHumnd) as a final optimization step on build.
Proposed Solution
Noted by: @drwpow these will probably stay in dev no matter what because there are a lot of weird behaviors when you try and treeshake something almost as a race condition with other stuff happening on-the-fly.
But as a final build step when we know what the final HTML & CSS is only necessary classnames should persist.
The text was updated successfully, but these errors were encountered: