Vue3+elementui plus Method for Creating Projects
- 2021-10-11 17:30:16
- OfStack
1. Using elementui plus version to load components on demand will report errors
Error: Cannot find module 'babel-preset-es2015' from 'D:\danzhukeji\danzhu\my_pp\src'
Under such circumstances
{
"presets": [["es2015", { "modules": false }]],
"plugins": [
[
"component",
{
"libraryName": "element-plus",
"styleLibraryName": "theme-chalk"
}
]
]
}
Replace it with the following without installing any plug-in dependencies
{
"presets": [["@babel/preset-env", { "modules": false }]],
"plugins": [
[
"component",
{
"libraryName": "element-plus",
"styleLibraryName": "theme-chalk"
}
]
]
}