mirror of
https://github.com/ershisan99/DevToysWeb.git
synced 2026-01-30 05:02:13 +00:00
perf(dev): speed up dev server
Avoid compiling the entire of mui library by using babel.
This commit is contained in:
23
.babelrc
23
.babelrc
@@ -1,4 +1,5 @@
|
||||
// https://emotion.sh/docs/css-prop##babel-preset
|
||||
// https://mui.com/guides/minimizing-bundle-size/#option-2
|
||||
{
|
||||
"presets": [
|
||||
[
|
||||
@@ -11,5 +12,25 @@
|
||||
}
|
||||
]
|
||||
],
|
||||
"plugins": [["@emotion/babel-plugin"]]
|
||||
"plugins": [
|
||||
[
|
||||
"babel-plugin-import",
|
||||
{
|
||||
"libraryName": "@mui/material",
|
||||
"libraryDirectory": "",
|
||||
"camel2DashComponentName": false
|
||||
},
|
||||
"core"
|
||||
],
|
||||
[
|
||||
"babel-plugin-import",
|
||||
{
|
||||
"libraryName": "@mui/icons-material",
|
||||
"libraryDirectory": "",
|
||||
"camel2DashComponentName": false
|
||||
},
|
||||
"icons"
|
||||
],
|
||||
["@emotion/babel-plugin"]
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user