@tarojs/helper 3.6.7 → 3.6.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.
@@ -1,2 +1,2 @@
1
1
  import type { OnResolveArgs, OnResolveResult } from 'esbuild';
2
- export declare function externalEsbuildModule(args: Partial<OnResolveArgs>): OnResolveResult;
2
+ export declare function externalEsbuildModule({ path, namespace, importer, pluginData }: Partial<OnResolveArgs>): OnResolveResult;
@@ -1,13 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.externalEsbuildModule = void 0;
4
- const lodash_1 = require("lodash");
5
- function externalEsbuildModule(args) {
6
- return Object.assign(Object.assign({}, (0, lodash_1.omit)(args, [
7
- 'path',
8
- 'namespace',
9
- 'pluginData',
10
- ])), { external: true });
4
+ const path_1 = require("path");
5
+ function externalEsbuildModule({ path, namespace, importer, pluginData }) {
6
+ if (namespace === 'file' && importer && path) {
7
+ path = (0, path_1.resolve)(importer, path);
8
+ }
9
+ return {
10
+ path,
11
+ namespace,
12
+ pluginData,
13
+ external: true
14
+ };
11
15
  }
12
16
  exports.externalEsbuildModule = externalEsbuildModule;
13
17
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/esbuild/utils.ts"],"names":[],"mappings":";;;AAAA,mCAA6B;AAI7B,SAAgB,qBAAqB,CAAE,IAA4B;IACjE,uCACK,IAAA,aAAI,EAAC,IAAI,EAAE;QACZ,MAAM;QACN,WAAW;QACX,YAAY;KACb,CAAC,KACF,QAAQ,EAAE,IAAI,IACf;AACH,CAAC;AATD,sDASC"}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/esbuild/utils.ts"],"names":[],"mappings":";;;AAAA,+BAA8B;AAI9B,SAAgB,qBAAqB,CAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAA0B;IACtG,IAAI,SAAS,KAAK,MAAM,IAAI,QAAQ,IAAI,IAAI,EAAE;QAC5C,IAAI,GAAG,IAAA,cAAO,EAAC,QAAQ,EAAE,IAAI,CAAC,CAAA;KAC/B;IACD,OAAO;QACL,IAAI;QACJ,SAAS;QACT,UAAU;QACV,QAAQ,EAAE,IAAI;KACf,CAAA;AACH,CAAC;AAVD,sDAUC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tarojs/helper",
3
- "version": "3.6.7",
3
+ "version": "3.6.9-alpha.1",
4
4
  "description": "Taro Helper",
5
5
  "main": "index.js",
6
6
  "types": "dist/index.d.ts",