Skip to content

Commit df5b119

Browse files
fix: ensure deterministic icon sort order in client bundle (#446)
1 parent 05b6903 commit df5b119

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/context.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,11 @@ export class NuxtIconModuleContext {
253253
}))
254254
}
255255

256+
for (const collection of collections.values()) {
257+
const sortedEntries = Object.entries(collection.icons).sort(([nameA], [nameB]) => nameA.localeCompare(nameB))
258+
collection.icons = Object.fromEntries(sortedEntries)
259+
}
260+
256261
return {
257262
collections: [...collections.values()],
258263
count,

0 commit comments

Comments
 (0)