Skip to content

Commit

Permalink
chore: print mdi warning instead of error dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
kingyue737 committed Sep 26, 2023
1 parent acda877 commit 3b97dba
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,14 @@ export default defineConfig({
Modify({
exclude: ['node_modules/**'],
find: /\b(?<![/\w])(mdi-[\w-]+)\b(?!\.)/,
replace: (match: string) => mdi[match],
replace: (match: string) => {
if (mdi[match]) {
return mdi[match]
} else {
console.warn('[plugin-modify] No matched svg icon for ' + match)
return match
}
},
sourcemap: false,
}),
vue2(),
Expand Down

0 comments on commit 3b97dba

Please sign in to comment.