Skip to content

Commit e8f9771

Browse files
committed
fix(vite): #14
1 parent 161158e commit e8f9771

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

vite.config.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ export default ({ command, mode }) => {
6363
Uni(),
6464
UnoCSS(),
6565
// svg 可以当做组件来使用(Vite plugin to load SVG files as Vue components, using SVGO for optimization.)
66-
svgLoader(),
66+
svgLoader({
67+
defaultImport: 'url', // or 'raw'
68+
}),
6769
createSvgIconsPlugin({
6870
// 指定要缓存的文件夹
6971
iconDirs: [path.resolve(process.cwd(), 'src/assets/svg')],

0 commit comments

Comments
 (0)