We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 15d3cc5 commit 1a02395Copy full SHA for 1a02395
packages/nutui-taro-demo/babel.config.js
@@ -1,6 +1,7 @@
1
// babel-preset-taro 更多选项和默认值:
2
// https://github.com/NervJS/taro/blob/next/packages/babel-preset-taro/README.md
3
const replaceIcons = require('@nutui/replace-icons')
4
+const projectID = process.env.VITE_APP_PROJECT_ID
5
6
module.exports = {
7
presets: [
@@ -14,11 +15,11 @@ module.exports = {
14
15
],
16
plugins: [
17
['@babel/plugin-transform-typescript', { allowDeclareFields: true }],
- [
18
+ projectID === 'jmapp' && [
19
replaceIcons({
20
sourceLibrary: ['@nutui/icons-react-taro', '@nutui/icons-react'],
21
targetLibrary: '@nutui/jdesign-icons-react-taro',
22
}),
23
- ],
24
+ ].filter(Boolean),
25
}
0 commit comments