Skip to content

@nuxt/icon includes unrelated icons in icons.json when only using customCollections with scan: true #410

@TheHexeon

Description

@TheHexeon

I'm using only custom icon collections via customCollections, but when clientBundle.scan is enabled, the build includes thousands of icons from unrelated collections in the final bundle (icons.json). This happens even though no other icon sets are used anywhere in the project. I expect the bundle to include only the icons I actually use from my defined collections.

Image

This is the request that happens at the start of the app, loading nearly 8,000 icons, while my custom icon set only has 60 icons. How can I configure the bundler or Nuxt Icon so that only these 60 icons are included in the final bundle instead of the entire collection?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions