babel-preset-taro 4.0.3-alpha.4 → 4.0.3
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/index.js +3 -1
- package/package.json +5 -5
package/index.js
CHANGED
|
@@ -35,8 +35,10 @@ module.exports = (_, options = {}) => {
|
|
|
35
35
|
const isSolid = options.framework === 'solid' && !isVite
|
|
36
36
|
// vite 不需要 vue 的 preset,在内部已经处理了
|
|
37
37
|
const isVue3 = options.framework === 'vue3' && !isVite
|
|
38
|
+
// TODO:后续改为在 vite harmony 中实现对 ts 的支持
|
|
39
|
+
const isHarmony = process.env.TARO_PLATFORM === 'harmony'
|
|
38
40
|
// vite 不需要使用 babel 处理 ts,在 esbuild 中处理了
|
|
39
|
-
const isTs = options.ts && !isVite
|
|
41
|
+
const isTs = options.ts && (!isVite || isHarmony)
|
|
40
42
|
const moduleName = options.framework.charAt(0).toUpperCase() + options.framework.slice(1)
|
|
41
43
|
const presetReactConfig = options.react || {}
|
|
42
44
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babel-preset-taro",
|
|
3
|
-
"version": "4.0.3
|
|
3
|
+
"version": "4.0.3",
|
|
4
4
|
"description": "Taro babel preset",
|
|
5
5
|
"author": "O2Team",
|
|
6
6
|
"license": "MIT",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"babel-plugin-minify-dead-code-elimination": "^0.5.2",
|
|
35
35
|
"babel-plugin-transform-imports-api": "1.0.0",
|
|
36
36
|
"core-js": "^3.36.1",
|
|
37
|
-
"@tarojs/helper": "4.0.3
|
|
38
|
-
"babel-plugin-transform-solid-jsx": "4.0.3
|
|
37
|
+
"@tarojs/helper": "4.0.3",
|
|
38
|
+
"babel-plugin-transform-solid-jsx": "4.0.3"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@babel/core": "^7.24.4",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@vue/babel-plugin-jsx": "^1.2.2",
|
|
45
45
|
"babel-preset-solid": "^1.8.16",
|
|
46
46
|
"react-refresh": "^0.14.0",
|
|
47
|
-
"@tarojs/taro-rn": "4.0.3
|
|
47
|
+
"@tarojs/taro-rn": "4.0.3"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"@babel/core": "^7.0.0",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@vue/babel-plugin-jsx": "^1.2.2",
|
|
54
54
|
"babel-preset-solid": "^1.8.16",
|
|
55
55
|
"react-refresh": "^0.14.0",
|
|
56
|
-
"@tarojs/taro-rn": "4.0.3
|
|
56
|
+
"@tarojs/taro-rn": "4.0.3"
|
|
57
57
|
},
|
|
58
58
|
"peerDependenciesMeta": {
|
|
59
59
|
"@babel/preset-react": {
|