unocss / unocss

The instant on-demand atomic CSS engine.

Home Page:https://unocss.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Icons Preset Causes Large CSS Bundle - Need Solution for On-Demand CSS for Vue Components

green-mike opened this issue · comments

Clear and concise description of the problem

I work with Nuxt 3 and unocss. When using the icons preset, I noticed that it causes the CSS bundle size to increase significantly(600kb). This is problematic for performance, especially for applications where only a few icons are used per page, but the CSS for all icons is included in the final bundle.

Suggested solution

To address this, I suggest implementing a way to allow Vue components to include only the CSS for the icons they actually use. This on-demand approach would help keep the CSS bundle size minimal and improve performance.

Alternative

No response

Additional context

No response

Validations

  • Read the Contributing Guidelines.
  • Read the README.md of using the package.
  • Already used the Interactive Docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

We temporarily closed this due to the lack of enough information. We could not identify whether it was a bug or a userland misconfiguration with the given info.
Please provide a minimal reproduction to reopen the issue.
Thanks.

Why reproduction is required