Skip to content

Commit

Permalink
fix: 更换 babel import plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Mmx233 committed Dec 10, 2023
1 parent 478230a commit 470ba52
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 23 deletions.
3 changes: 2 additions & 1 deletion web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"@babel/preset-env": "^7.23.5",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@mui/base": "5.0.0-beta.26",
"@mui/icons-material": "^5.14.19",
"@mui/lab": "5.0.0-alpha.129",
"@mui/material": "^5.14.20",
Expand All @@ -36,7 +37,7 @@
"@types/react-transition-group": "^4.4.10",
"@vitejs/plugin-legacy": "^5.2.0",
"@vitejs/plugin-react": "^4.2.1",
"babel-plugin-import": "^1.13.8",
"babel-plugin-direct-import": "^1.0.0",
"prettier": "^3.1.1",
"terser": "^5.26.0",
"typescript": "^4.9.5",
Expand Down
16 changes: 10 additions & 6 deletions web/pnpm-lock.yaml

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

18 changes: 2 additions & 16 deletions web/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,8 @@ export default defineConfig({
babel: {
plugins: [
[
"babel-plugin-import",
{
libraryName: "@mui/material",
libraryDirectory: "",
camel2DashComponentName: false,
},
"core",
],
[
"babel-plugin-import",
{
libraryName: "@mui/icons-material",
libraryDirectory: "",
camel2DashComponentName: false,
},
"icons",
"babel-plugin-direct-import",
{ modules: ["@mui/material", "@mui/icons-material"] },
],
],
},
Expand Down

0 comments on commit 470ba52

Please sign in to comment.