[bug report] vue-cli @ 3 official document configuration on demand reference, babel-plugin-component needs to be reinstalled to load successfully
- Dominant language
- Vue
- Stars
- 54k
- Forks
- 14.4k
- PR merge metrics
- No merged PRs in 30d
Description
### Element UI version
2.13.0
### OS/Browsers version
window10/ 76.0.3809.132 (64 位)
### Vue version
2.6.11
### Reproduction Link
https://github.com/menghuanCode/element-issue
### Steps to reproduce
1. vue create . (create a project)
使用 Vue-cli@3 创建一个项目
2. npm install element-ui
3. npm install babel-plugin-component -D
4. update babel.config.js
```js
module.exports = {
presets: [ '@vue/cli-plugin-babel/preset' ],
plugins: [
[ "component",
{
"libraryName": "element-ui",
"styleLibraryName": "theme-chalk"
}
]
]
}
```
### What is Expected?
Run successfully
运行成功
### What is actually happening?
```txt
ERROR Failed:
This dependency was not found:
* core-js/modules/es.object.to-string in ./src/router/index.js
To install it, you can run: npm install --save core-js/modules/es.object.to-string
```
Need to reinstall babel-plugin-component to run successfully
(需要重新安装 babel-plugin-component 才能运行成功)
I don't know what happened during this time
(我不知道这段时间发生了什么)
I konw vue-cli-plugin-element can use
(我知道有 vue-cli-plugin-element 可以使用)
I am out of curiosity
我出于好奇
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.