We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d34b7c9 commit 6ad8d08Copy full SHA for 6ad8d08
vite.config.ts
@@ -96,7 +96,22 @@ export default defineConfig(({ mode }) => {
96
// 支持 JSX、TSX 语法
97
vueJsx(),
98
// 支持将 SVG 文件导入为 Vue 组件
99
- svgLoader({ defaultImport: "url" }),
+ svgLoader({
100
+ defaultImport: "url",
101
+ svgoConfig: {
102
+ plugins: [
103
+ {
104
+ name: "preset-default",
105
+ params: {
106
+ overrides: {
107
+ // @see https://github.com/svg/svgo/issues/1128
108
+ removeViewBox: false
109
+ }
110
111
112
+ ]
113
114
+ }),
115
// 自动生成 SvgIcon 组件和 SVG 雪碧图
116
SvgComponent({
117
iconDir: [resolve(__dirname, "src/common/assets/icons")],
0 commit comments