在项目根目录在.babelrc 或 babel.config.js 中添加配置即可
module.exports = {
plugins: [
['import', {
libraryName: 'vant',
libraryDirectory: 'es',
style: true
}, 'vant']
]
}
在项目根目录在.babelrc 或 babel.config.js 中添加配置即可
module.exports = {
plugins: [
['import', {
libraryName: 'vant',
libraryDirectory: 'es',
style: true
}, 'vant']
]
}