mirror of
https://github.com/sunniejs/vue-h5-template.git
synced 2025-04-26 19:46:59 +08:00
readme
This commit is contained in:
parent
ec147e31a9
commit
f8f6db730d
17
README.md
17
README.md
@ -222,13 +222,16 @@ module.exports = {
|
|||||||
|
|
||||||
#### 安装插件
|
#### 安装插件
|
||||||
|
|
||||||
```javascript
|
```bash
|
||||||
npm i babel-plugin-import -D
|
npm i babel-plugin-import -D
|
||||||
|
```
|
||||||
|
|
||||||
|
在` babel.config.js` 设置
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
|
||||||
// 对于使用 babel7 的用户,可以在 babel.config.js 中配置
|
// 对于使用 babel7 的用户,可以在 babel.config.js 中配置
|
||||||
module.exports = {
|
const plugins = [
|
||||||
presets: [['@vue/cli-plugin-babel/preset', {useBuiltIns: 'entry'}]],
|
|
||||||
plugins: [
|
|
||||||
[
|
[
|
||||||
'import',
|
'import',
|
||||||
{
|
{
|
||||||
@ -238,8 +241,12 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
'vant'
|
'vant'
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
module.exports = {
|
||||||
|
presets: [['@vue/cli-plugin-babel/preset', {useBuiltIns: 'usage', corejs: 3}]],
|
||||||
|
plugins
|
||||||
}
|
}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 使用组件
|
#### 使用组件
|
||||||
|
Loading…
x
Reference in New Issue
Block a user