@tarojs/helper 4.0.8 → 4.0.9-alpha.1
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/dist/babelRegister.js
CHANGED
|
@@ -10,6 +10,7 @@ exports.injectDefineConfigHeader = void 0;
|
|
|
10
10
|
function injectDefineConfigHeader(babel) {
|
|
11
11
|
const appConfig = 'function defineAppConfig(config) { return config }';
|
|
12
12
|
const pageConfig = 'function definePageConfig(config) { return config }';
|
|
13
|
+
const importNative = "function importNativeComponent(path = '', name = '', exportName = '') { return name }";
|
|
13
14
|
const prependHeader = (nodePath, header) => {
|
|
14
15
|
var _a;
|
|
15
16
|
const parsedHeader = (_a = babel.parse(header, { filename: '' })) === null || _a === void 0 ? void 0 : _a.program.body[0];
|
|
@@ -26,6 +27,9 @@ function injectDefineConfigHeader(babel) {
|
|
|
26
27
|
return prependHeader(nodePath, appConfig);
|
|
27
28
|
case 'definePageConfig':
|
|
28
29
|
return prependHeader(nodePath, pageConfig);
|
|
30
|
+
case 'importNativeComponent':
|
|
31
|
+
return prependHeader(nodePath, importNative);
|
|
32
|
+
default:
|
|
29
33
|
}
|
|
30
34
|
}
|
|
31
35
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"babelRegister.js","sourceRoot":"","sources":["../src/babelRegister.ts"],"names":[],"mappings":";;;AAEA;;;;;EAKE;AACF,SAAgB,wBAAwB,CAAE,KAA8B;IACtE,MAAM,SAAS,GAAG,oDAAoD,CAAA;IACtE,MAAM,UAAU,GAAG,qDAAqD,CAAA;
|
|
1
|
+
{"version":3,"file":"babelRegister.js","sourceRoot":"","sources":["../src/babelRegister.ts"],"names":[],"mappings":";;;AAEA;;;;;EAKE;AACF,SAAgB,wBAAwB,CAAE,KAA8B;IACtE,MAAM,SAAS,GAAG,oDAAoD,CAAA;IACtE,MAAM,UAAU,GAAG,qDAAqD,CAAA;IACxE,MAAM,YAAY,GAAG,uFAAuF,CAAA;IAE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
6
|
"license": "MIT",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@types/babel__core": "^7.20.5",
|
|
54
54
|
"@types/babel__generator": "^7.6.8",
|
|
55
55
|
"@types/babel__traverse": "^7.20.5",
|
|
56
|
-
"@tarojs/taro": "4.0.
|
|
56
|
+
"@tarojs/taro": "4.0.9-alpha.1"
|
|
57
57
|
},
|
|
58
58
|
"scripts": {
|
|
59
59
|
"prod": "pnpm run build",
|
|
Binary file
|