babel-preset-taro 4.0.0-beta.21 → 4.0.0-beta.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/index.js +6 -0
- package/package.json +4 -3
package/index.js
CHANGED
|
@@ -30,6 +30,7 @@ module.exports = (_, options = {}) => {
|
|
|
30
30
|
const overrides = []
|
|
31
31
|
const isVite = options.compiler === 'vite'
|
|
32
32
|
const isReact = options.framework === 'react' || options.framework === 'preact' && !isVite
|
|
33
|
+
const isSolid = options.framework === 'solid'
|
|
33
34
|
const isNerv = options.framework === 'nerv' && !isVite
|
|
34
35
|
const isVue = options.framework === 'vue' && !isVite
|
|
35
36
|
const isVue3 = options.framework === 'vue3' && !isVite
|
|
@@ -60,6 +61,11 @@ module.exports = (_, options = {}) => {
|
|
|
60
61
|
})
|
|
61
62
|
}
|
|
62
63
|
}
|
|
64
|
+
} else if (isSolid) {
|
|
65
|
+
presets.push([require('babel-preset-solid'), {
|
|
66
|
+
moduleName: '@tarojs/plugin-framework-react/dist/runtime/reconciler',
|
|
67
|
+
generate: 'universal',
|
|
68
|
+
}])
|
|
63
69
|
}
|
|
64
70
|
|
|
65
71
|
if (isVue || isVue3) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babel-preset-taro",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.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",
|
|
@@ -32,9 +32,10 @@
|
|
|
32
32
|
"babel-plugin-dynamic-import-node": "2.3.3",
|
|
33
33
|
"babel-plugin-minify-dead-code-elimination": "^0.5.2",
|
|
34
34
|
"babel-plugin-transform-imports-api": "1.0.0",
|
|
35
|
+
"babel-preset-solid": "^1.8.15",
|
|
35
36
|
"core-js": "^3.6.5",
|
|
36
37
|
"react-refresh": "^0.11.0",
|
|
37
|
-
"@tarojs/helper": "4.0.0-beta.
|
|
38
|
+
"@tarojs/helper": "4.0.0-beta.23"
|
|
38
39
|
},
|
|
39
40
|
"devDependencies": {
|
|
40
41
|
"@babel/core": "^7.14.5",
|
|
@@ -46,7 +47,7 @@
|
|
|
46
47
|
"jest-environment-node": "^29.5.0",
|
|
47
48
|
"ts-jest": "^29.0.5",
|
|
48
49
|
"typescript": "^4.7.4",
|
|
49
|
-
"@tarojs/shared": "4.0.0-beta.
|
|
50
|
+
"@tarojs/shared": "4.0.0-beta.23"
|
|
50
51
|
},
|
|
51
52
|
"peerDependencies": {
|
|
52
53
|
"@babel/core": "*"
|