babel-preset-taro 3.4.2 → 3.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.js +1 -1
  2. package/package.json +6 -6
  3. package/rn/index.js +1 -1
package/index.js CHANGED
@@ -162,7 +162,7 @@ module.exports = (_, options = {}) => {
162
162
  apis
163
163
  }])
164
164
  }
165
- if (options['dynamic-import-node'] || process.env.TARO_ENV !== 'h5') {
165
+ if (typeof options['dynamic-import-node'] === 'boolean' ? options['dynamic-import-node'] : process.env.TARO_ENV !== 'h5') {
166
166
  plugins.push([require('babel-plugin-dynamic-import-node')])
167
167
  }
168
168
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babel-preset-taro",
3
- "version": "3.4.2",
3
+ "version": "3.4.5",
4
4
  "description": "> TODO: description",
5
5
  "author": "yuche <i@yuche.me>",
6
6
  "homepage": "https://github.com/nervjs/taro/tree/master/packages/babel-preset-taro#readme",
@@ -36,8 +36,8 @@
36
36
  "@babel/runtime": "^7.14.5",
37
37
  "@babel/runtime-corejs3": "^7.14.5",
38
38
  "@prefresh/babel-plugin": "^0.4.1",
39
- "@tarojs/helper": "3.4.2",
40
- "@tarojs/taro-h5": "3.4.2",
39
+ "@tarojs/helper": "3.4.5",
40
+ "@tarojs/taro-h5": "3.4.5",
41
41
  "@vue/babel-plugin-jsx": "^1.0.6",
42
42
  "@vue/babel-preset-jsx": "^1.2.4",
43
43
  "babel-plugin-dynamic-import-node": "2.3.3",
@@ -45,11 +45,11 @@
45
45
  "babel-plugin-jsx-attributes-array-to-object": "0.3.0",
46
46
  "babel-plugin-minify-dead-code-elimination": "0.5.1",
47
47
  "babel-plugin-transform-imports-api": "1.0.0",
48
- "babel-plugin-transform-react-jsx-to-rn-stylesheet": "3.4.2",
49
- "babel-plugin-transform-taroapi": "3.4.2",
48
+ "babel-plugin-transform-react-jsx-to-rn-stylesheet": "3.4.5",
49
+ "babel-plugin-transform-taroapi": "3.4.5",
50
50
  "core-js": "^3.6.5",
51
51
  "metro-react-native-babel-preset": "^0.66.2",
52
52
  "react-refresh": "0.9.0"
53
53
  },
54
- "gitHead": "26b329326c6a7da652e8d712ee33df01ab8d2d0e"
54
+ "gitHead": "789e873f7b9477124b44a900cd4f6a2810e4e06a"
55
55
  }
package/rn/index.js CHANGED
@@ -108,7 +108,7 @@ module.exports = (_, options = {}) => {
108
108
  decoratorsBeforeExport,
109
109
  decoratorsLegacy
110
110
  } = options
111
- if (options.framework && options.framework !== 'react') {
111
+ if (options.framework && !['react', 'preact'].includes(options.framework)) {
112
112
  throw new Error(`Value "${options.framework}" of option "framework" is not supported for React-Native`)
113
113
  }
114
114