Skip to content

Commit beefcb7

Browse files
authored
Warn and continue when local icon cannot be loaded (#184)
* fix(#183): warn and continue when local icon cannot be loaded * chore: add changeset
1 parent b55cd5f commit beefcb7

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.changeset/heavy-insects-yawn.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"astro-icon": patch
3+
---
4+
5+
Improves handling of invalid local icons, which previously caused all local icons to silently fail.

packages/core/src/loaders/loadLocalCollection.ts

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export default async function createLocalCollection(
1717
prefix: "local",
1818
keepTitles: true,
1919
includeSubDirs: true,
20+
ignoreImportErrors: 'warn',
2021
keyword: (file) => file.subdir + file.file,
2122
});
2223

0 commit comments

Comments
 (0)