Skip to content

fix: ensure deterministic icon sort order in client bundle#446

Merged
antfu merged 1 commit intonuxt:mainfrom
andreasgangso:fix/deterministic-client-bundle
Nov 26, 2025
Merged

fix: ensure deterministic icon sort order in client bundle#446
antfu merged 1 commit intonuxt:mainfrom
andreasgangso:fix/deterministic-client-bundle

Conversation

@andreasgangso
Copy link
Copy Markdown
Contributor

Sort icons alphabetically within each collection to ensure idempotent output regardless of discovery order

🔗 Linked issue

Resolves #445

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

I'd like to cache the client bundle but currently it easily changes between runs when using a config like:

clientBundle: {
    includeCustomCollections: true,
    scan: true,
}

It's because the order of the keys in each collection's "icons" object is not consistent.

Sort icons alphabetically within each collection to ensure
idempotent output regardless of discovery order
@antfu antfu merged commit df5b119 into nuxt:main Nov 26, 2025
1 check passed
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

Successfully merging this pull request may close these issues.

Deterministic icon order in client bundle

2 participants