Skip to content

Commit

Permalink
chore: upgrade svg plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaofan2406 committed Jul 23, 2024
1 parent 2c5c7fb commit 905669b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 15 deletions.
7 changes: 6 additions & 1 deletion .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ const config: StorybookConfig = {
async viteFinal(config) {
// Merge custom configuration into the default config
return mergeConfig(config, {
plugins: [svgr({ exportAsDefault: true })],
plugins: [
svgr({
svgrOptions: { exportType: 'default', ref: true, svgo: true },
include: '**/*.svg',
}),
],
});
},
};
Expand Down
26 changes: 13 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
"svgo": "^3.3.2",
"terser-webpack-plugin": "^5.3.10",
"typescript": "^5.5.3",
"vite-plugin-svgr": "^3.3.0",
"vite-plugin-svgr": "^4.2.0",
"wcag-contrast": "^3.0.0",
"webpack": "^5.92.1",
"webpack-cli": "^5.1.4",
Expand Down

0 comments on commit 905669b

Please sign in to comment.