f8f6db73 by sunnie

readme

1 parent ec147e31
Showing 1 changed file with 12 additions and 5 deletions
......@@ -222,13 +222,16 @@ module.exports = {
#### 安装插件
```javascript
```bash
npm i babel-plugin-import -D
```
` babel.config.js` 设置
```javascript
// 对于使用 babel7 的用户,可以在 babel.config.js 中配置
module.exports = {
presets: [['@vue/cli-plugin-babel/preset', {useBuiltIns: 'entry'}]],
plugins: [
const plugins = [
[
'import',
{
......@@ -238,8 +241,12 @@ module.exports = {
},
'vant'
]
]
]
module.exports = {
presets: [['@vue/cli-plugin-babel/preset', {useBuiltIns: 'usage', corejs: 3}]],
plugins
}
```
#### 使用组件
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!