You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
824 B
35 lines
824 B
// babel-preset-taro 更多选项和默认值: |
|
// https://docs.taro.zone/docs/next/babel-config |
|
module.exports = { |
|
presets: [ |
|
['taro', { |
|
framework: 'react', |
|
ts: true, |
|
compiler: 'webpack5', |
|
reactRuntime: 'automatic', |
|
}] |
|
], |
|
plugins: [ |
|
// Taroify 组件按需导入配置 |
|
[ |
|
"import", |
|
{ |
|
libraryName: "@taroify/core", |
|
libraryDirectory: "", |
|
style: false, // 样式已在 app.ts 中全局导入 |
|
}, |
|
"@taroify/core", |
|
], |
|
[ |
|
"import", |
|
{ |
|
libraryName: "@taroify/icons", |
|
libraryDirectory: "", |
|
camel2DashComponentName: false, |
|
style: false, |
|
customName: (name) => name === "Icon" ? "@taroify/icons/van/VanIcon" : `@taroify/icons/${name}`, |
|
}, |
|
"@taroify/icons", |
|
], |
|
], |
|
}
|
|
|