babel-preset-taro 3.6.22 → 3.6.23
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.
- package/LICENSE +14 -0
- package/index.js +2 -3
- package/package.json +5 -5
package/LICENSE
CHANGED
|
@@ -158,3 +158,17 @@ MIT (stencil-vue2-output-target):
|
|
|
158
158
|
The following files embed [stencil-vue2-output-target](https://github.com/diondree/stencil-vue2-output-target) MIT:
|
|
159
159
|
`/packages/taro-components-library-vue2/src/vue-component-lib/utils.ts`
|
|
160
160
|
See `/LICENSE` for details of the license.
|
|
161
|
+
|
|
162
|
+
==================
|
|
163
|
+
|
|
164
|
+
MIT (weui):
|
|
165
|
+
The following files embed [stencil-vue2-output-target](https://github.com/Tencent/weui) MIT:
|
|
166
|
+
`/packages/taro-components/src/components/*.scss`
|
|
167
|
+
See `/LICENSE.txt` for details of the license.
|
|
168
|
+
|
|
169
|
+
==================
|
|
170
|
+
|
|
171
|
+
Apache-2.0 (intersection-observer):
|
|
172
|
+
The following files embed [intersection-observer](https://github.com/GoogleChromeLabs/intersection-observer) Apache-2.0:
|
|
173
|
+
`/packages/taro-api/src/polyfill/intersection-observer.ts`
|
|
174
|
+
See `/LICENSE.txt` for details of the license.
|
package/index.js
CHANGED
|
@@ -21,7 +21,6 @@ function hasBrowserslist () {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
module.exports = (_, options = {}) => {
|
|
24
|
-
const isWeb = require('@tarojs/shared').isWebPlatform()
|
|
25
24
|
if (process.env.TARO_ENV === 'rn') {
|
|
26
25
|
const presetForReactNative = require('./rn')
|
|
27
26
|
return presetForReactNative(_, options)
|
|
@@ -49,7 +48,7 @@ module.exports = (_, options = {}) => {
|
|
|
49
48
|
runtime: options.reactJsxRuntime || 'automatic',
|
|
50
49
|
...presetReactConfig
|
|
51
50
|
}])
|
|
52
|
-
if (
|
|
51
|
+
if (process.env.TARO_PLATFORM === 'web' && process.env.NODE_ENV !== 'production' && options.hot !== false) {
|
|
53
52
|
if (options.framework === 'react') {
|
|
54
53
|
plugins.push([require('react-refresh/babel'), { skipEnvCheck: true }])
|
|
55
54
|
} else if (options.framework === 'preact') {
|
|
@@ -179,7 +178,7 @@ module.exports = (_, options = {}) => {
|
|
|
179
178
|
version
|
|
180
179
|
}])
|
|
181
180
|
|
|
182
|
-
if (typeof options['dynamic-import-node'] === 'boolean' ? options['dynamic-import-node'] :
|
|
181
|
+
if (typeof options['dynamic-import-node'] === 'boolean' ? options['dynamic-import-node'] : process.env.TARO_PLATFORM !== 'web') {
|
|
183
182
|
plugins.push([require('babel-plugin-dynamic-import-node')])
|
|
184
183
|
}
|
|
185
184
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babel-preset-taro",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.23",
|
|
4
4
|
"description": "Taro babel preset",
|
|
5
5
|
"author": "yuche <i@yuche.me>",
|
|
6
6
|
"homepage": "https://github.com/nervjs/taro/tree/master/packages/babel-preset-taro#readme",
|
|
@@ -35,8 +35,7 @@
|
|
|
35
35
|
"lodash": "^4.17.21",
|
|
36
36
|
"metro-react-native-babel-preset": "^0.72.1",
|
|
37
37
|
"react-refresh": "^0.11.0",
|
|
38
|
-
"@tarojs/helper": "3.6.
|
|
39
|
-
"@tarojs/shared": "3.6.22"
|
|
38
|
+
"@tarojs/helper": "3.6.23"
|
|
40
39
|
},
|
|
41
40
|
"devDependencies": {
|
|
42
41
|
"@babel/core": "^7.14.5",
|
|
@@ -47,13 +46,14 @@
|
|
|
47
46
|
"jest-cli": "^29.3.1",
|
|
48
47
|
"jest-environment-node": "^29.5.0",
|
|
49
48
|
"ts-jest": "^29.0.5",
|
|
50
|
-
"typescript": "^4.7.4"
|
|
49
|
+
"typescript": "^4.7.4",
|
|
50
|
+
"@tarojs/shared": "3.6.23"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"@babel/core": "*"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
56
56
|
"test": "jest --collectCoverage",
|
|
57
|
-
"test:ci": "jest --ci
|
|
57
|
+
"test:ci": "jest --ci -i --coverage --silent"
|
|
58
58
|
}
|
|
59
59
|
}
|