@module-federation/esbuild 0.0.109 → 0.0.111

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.
Files changed (60) hide show
  1. package/dist/adapters/lib/collect-exports.js +15 -13
  2. package/dist/adapters/lib/collect-exports.mjs +0 -7
  3. package/dist/adapters/lib/commonjs.js +22 -25
  4. package/dist/adapters/lib/commonjs.mjs +13 -41
  5. package/dist/adapters/lib/containerPlugin.js +14 -13
  6. package/dist/adapters/lib/containerPlugin.mjs +1 -4
  7. package/dist/adapters/lib/containerReference.js +14 -13
  8. package/dist/adapters/lib/containerReference.mjs +1 -4
  9. package/dist/adapters/lib/lexer.js +17 -14
  10. package/dist/adapters/lib/lexer.mjs +0 -2
  11. package/dist/adapters/lib/linkRemotesPlugin.js +13 -11
  12. package/dist/adapters/lib/linkRemotesPlugin.mjs +0 -2
  13. package/dist/adapters/lib/manifest.js +17 -16
  14. package/dist/adapters/lib/manifest.mjs +4 -9
  15. package/dist/adapters/lib/plugin.js +16 -16
  16. package/dist/adapters/lib/plugin.mjs +8 -44
  17. package/dist/adapters/lib/react-replacements.js +19 -14
  18. package/dist/adapters/lib/react-replacements.mjs +1 -2
  19. package/dist/adapters/lib/transform.js +13 -11
  20. package/dist/adapters/lib/transform.mjs +4 -8
  21. package/dist/adapters/lib/utils.js +20 -16
  22. package/dist/adapters/lib/utils.mjs +1 -3
  23. package/dist/build.js +47 -46
  24. package/dist/build.mjs +1 -2
  25. package/dist/index.js +17 -13
  26. package/dist/index.mjs +2 -4
  27. package/dist/lib/config/configuration-context.js +19 -16
  28. package/dist/lib/config/configuration-context.mjs +0 -2
  29. package/dist/lib/config/federation-config.js +2 -4
  30. package/dist/lib/config/federation-config.mjs +1 -2
  31. package/dist/lib/config/share-utils.js +24 -23
  32. package/dist/lib/config/share-utils.mjs +1 -10
  33. package/dist/lib/config/with-native-federation.js +13 -11
  34. package/dist/lib/config/with-native-federation.mjs +0 -5
  35. package/dist/lib/core/build-adapter.js +13 -11
  36. package/dist/lib/core/build-adapter.mjs +0 -2
  37. package/dist/lib/core/createContainerTemplate.js +18 -14
  38. package/dist/lib/core/createContainerTemplate.mjs +0 -2
  39. package/dist/lib/core/default-skip-list.js +21 -17
  40. package/dist/lib/core/default-skip-list.mjs +0 -2
  41. package/dist/lib/core/federation-options.js +2 -4
  42. package/dist/lib/core/federation-options.mjs +1 -2
  43. package/dist/lib/core/get-externals.js +17 -14
  44. package/dist/lib/core/get-externals.mjs +0 -2
  45. package/dist/lib/core/load-federation-config.js +13 -11
  46. package/dist/lib/core/load-federation-config.mjs +4 -8
  47. package/dist/lib/core/write-federation-info.js +13 -11
  48. package/dist/lib/core/write-federation-info.mjs +4 -8
  49. package/dist/lib/utils/logger.js +15 -13
  50. package/dist/lib/utils/logger.mjs +0 -2
  51. package/dist/lib/utils/mapped-paths.js +14 -13
  52. package/dist/lib/utils/mapped-paths.mjs +8 -14
  53. package/dist/lib/utils/normalize.js +17 -14
  54. package/dist/lib/utils/normalize.mjs +0 -2
  55. package/dist/lib/utils/package-info.js +21 -20
  56. package/dist/lib/utils/package-info.mjs +35 -41
  57. package/dist/plugin.js +19 -18
  58. package/dist/plugin.mjs +1 -2
  59. package/dist/rslib-runtime.mjs +31 -0
  60. package/package.json +6 -5
@@ -9,15 +9,18 @@ const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
9
9
  // The require scope
10
10
  var __webpack_require__ = {};
11
11
 
12
- /************************************************************************/
13
12
  // webpack/runtime/define_property_getters
14
13
  (() => {
15
- __webpack_require__.d = (exports, definition) => {
16
- for(var key in definition) {
17
- if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
18
- Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
19
- }
20
- }
14
+ __webpack_require__.d = (exports, getters, values) => {
15
+ var define = (defs, kind) => {
16
+ for(var key in defs) {
17
+ if(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {
18
+ Object.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });
19
+ }
20
+ }
21
+ };
22
+ define(getters, "get");
23
+ define(values, "value");
21
24
  };
22
25
  })();
23
26
  // webpack/runtime/has_own_property
@@ -34,15 +37,8 @@ __webpack_require__.r = (exports) => {
34
37
  Object.defineProperty(exports, '__esModule', { value: true });
35
38
  };
36
39
  })();
37
- /************************************************************************/
38
40
  var __webpack_exports__ = {};
39
41
  __webpack_require__.r(__webpack_exports__);
40
- __webpack_require__.d(__webpack_exports__, {
41
- DEFAULT_SKIP_LIST: () => (DEFAULT_SKIP_LIST),
42
- PREPARED_DEFAULT_SKIP_LIST: () => (PREPARED_DEFAULT_SKIP_LIST),
43
- isInSkipList: () => (isInSkipList),
44
- prepareSkipList: () => (prepareSkipList)
45
- });
46
42
  const DEFAULT_SKIP_LIST = [
47
43
  '@module-federation/native-federation-runtime',
48
44
  '@module-federation/native-federation',
@@ -87,13 +83,21 @@ function isInSkipList(entry, skipList) {
87
83
  return false;
88
84
  }
89
85
 
86
+ __webpack_require__.d(__webpack_exports__, {
87
+ isInSkipList: () => (isInSkipList),
88
+ prepareSkipList: () => (prepareSkipList)
89
+ }, {
90
+ DEFAULT_SKIP_LIST: DEFAULT_SKIP_LIST,
91
+ PREPARED_DEFAULT_SKIP_LIST: PREPARED_DEFAULT_SKIP_LIST
92
+ });
93
+
90
94
  exports.DEFAULT_SKIP_LIST = __webpack_exports__.DEFAULT_SKIP_LIST;
91
95
  exports.PREPARED_DEFAULT_SKIP_LIST = __webpack_exports__.PREPARED_DEFAULT_SKIP_LIST;
92
96
  exports.isInSkipList = __webpack_exports__.isInSkipList;
93
97
  exports.prepareSkipList = __webpack_exports__.prepareSkipList;
94
- for(var __webpack_i__ in __webpack_exports__) {
95
- if(["DEFAULT_SKIP_LIST","PREPARED_DEFAULT_SKIP_LIST","isInSkipList","prepareSkipList"].indexOf(__webpack_i__) === -1) {
96
- exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
98
+ for(var __rspack_i in __webpack_exports__) {
99
+ if(["DEFAULT_SKIP_LIST","PREPARED_DEFAULT_SKIP_LIST","isInSkipList","prepareSkipList"].indexOf(__rspack_i) === -1) {
100
+ exports[__rspack_i] = __webpack_exports__[__rspack_i];
97
101
  }
98
102
  }
99
103
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,5 +1,3 @@
1
-
2
- ;// CONCATENATED MODULE: ./src/lib/core/default-skip-list.ts
3
1
  const DEFAULT_SKIP_LIST = [
4
2
  '@module-federation/native-federation-runtime',
5
3
  '@module-federation/native-federation',
@@ -9,7 +9,6 @@ const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
9
9
  // The require scope
10
10
  var __webpack_require__ = {};
11
11
 
12
- /************************************************************************/
13
12
  // webpack/runtime/make_namespace_object
14
13
  (() => {
15
14
  // define __esModule on exports
@@ -20,12 +19,11 @@ __webpack_require__.r = (exports) => {
20
19
  Object.defineProperty(exports, '__esModule', { value: true });
21
20
  };
22
21
  })();
23
- /************************************************************************/
24
22
  var __webpack_exports__ = {};
25
23
  __webpack_require__.r(__webpack_exports__);
26
24
 
27
25
 
28
- for(var __webpack_i__ in __webpack_exports__) {
29
- exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
26
+ for(var __rspack_i in __webpack_exports__) {
27
+ exports[__rspack_i] = __webpack_exports__[__rspack_i];
30
28
  }
31
29
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,4 +1,3 @@
1
1
 
2
- ;// CONCATENATED MODULE: ./src/lib/core/federation-options.ts
3
-
4
2
 
3
+ export {};
@@ -9,15 +9,18 @@ const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
9
9
  // The require scope
10
10
  var __webpack_require__ = {};
11
11
 
12
- /************************************************************************/
13
12
  // webpack/runtime/define_property_getters
14
13
  (() => {
15
- __webpack_require__.d = (exports, definition) => {
16
- for(var key in definition) {
17
- if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
18
- Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
19
- }
20
- }
14
+ __webpack_require__.d = (exports, getters, values) => {
15
+ var define = (defs, kind) => {
16
+ for(var key in defs) {
17
+ if(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {
18
+ Object.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });
19
+ }
20
+ }
21
+ };
22
+ define(getters, "get");
23
+ define(values, "value");
21
24
  };
22
25
  })();
23
26
  // webpack/runtime/has_own_property
@@ -34,12 +37,8 @@ __webpack_require__.r = (exports) => {
34
37
  Object.defineProperty(exports, '__esModule', { value: true });
35
38
  };
36
39
  })();
37
- /************************************************************************/
38
40
  var __webpack_exports__ = {};
39
41
  __webpack_require__.r(__webpack_exports__);
40
- __webpack_require__.d(__webpack_exports__, {
41
- getExternals: () => (getExternals)
42
- });
43
42
  function getExternals(config) {
44
43
  const shared = Object.keys(config.shared ?? {});
45
44
  const remotes = config.remotes ?? {};
@@ -56,10 +55,14 @@ function getExternals(config) {
56
55
  return externals;
57
56
  }
58
57
 
58
+ __webpack_require__.d(__webpack_exports__, {
59
+ getExternals: () => (getExternals)
60
+ });
61
+
59
62
  exports.getExternals = __webpack_exports__.getExternals;
60
- for(var __webpack_i__ in __webpack_exports__) {
61
- if(["getExternals"].indexOf(__webpack_i__) === -1) {
62
- exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
63
+ for(var __rspack_i in __webpack_exports__) {
64
+ if(["getExternals"].indexOf(__rspack_i) === -1) {
65
+ exports[__rspack_i] = __webpack_exports__[__rspack_i];
63
66
  }
64
67
  }
65
68
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,5 +1,3 @@
1
-
2
- ;// CONCATENATED MODULE: ./src/lib/core/get-externals.ts
3
1
  function getExternals(config) {
4
2
  const shared = Object.keys(config.shared ?? {});
5
3
  const remotes = config.remotes ?? {};
@@ -9,15 +9,18 @@ const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
9
9
  // The require scope
10
10
  var __webpack_require__ = {};
11
11
 
12
- /************************************************************************/
13
12
  // webpack/runtime/define_property_getters
14
13
  (() => {
15
- __webpack_require__.d = (exports, definition) => {
16
- for(var key in definition) {
17
- if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
18
- Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
19
- }
20
- }
14
+ __webpack_require__.d = (exports, getters, values) => {
15
+ var define = (defs, kind) => {
16
+ for(var key in defs) {
17
+ if(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {
18
+ Object.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });
19
+ }
20
+ }
21
+ };
22
+ define(getters, "get");
23
+ define(values, "value");
21
24
  };
22
25
  })();
23
26
  // webpack/runtime/has_own_property
@@ -34,7 +37,6 @@ __webpack_require__.r = (exports) => {
34
37
  Object.defineProperty(exports, '__esModule', { value: true });
35
38
  };
36
39
  })();
37
- /************************************************************************/
38
40
  var __webpack_exports__ = {};
39
41
  // ESM COMPAT FLAG
40
42
  __webpack_require__.r(__webpack_exports__);
@@ -61,9 +63,9 @@ async function loadFederationConfig(fedOptions) {
61
63
  }
62
64
 
63
65
  exports.loadFederationConfig = __webpack_exports__.loadFederationConfig;
64
- for(var __webpack_i__ in __webpack_exports__) {
65
- if(["loadFederationConfig"].indexOf(__webpack_i__) === -1) {
66
- exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
66
+ for(var __rspack_i in __webpack_exports__) {
67
+ if(["loadFederationConfig"].indexOf(__rspack_i) === -1) {
68
+ exports[__rspack_i] = __webpack_exports__[__rspack_i];
67
69
  }
68
70
  }
69
71
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,16 +1,12 @@
1
- import { join } from "path";
2
- import { existsSync } from "fs";
1
+ import * as __rspack_external_path from "path";
2
+ import * as __rspack_external_fs from "fs";
3
3
 
4
- ;// CONCATENATED MODULE: external "path"
5
4
 
6
- ;// CONCATENATED MODULE: external "fs"
7
-
8
- ;// CONCATENATED MODULE: ./src/lib/core/load-federation-config.ts
9
5
 
10
6
 
11
7
  async function loadFederationConfig(fedOptions) {
12
- const fullConfigPath = join(fedOptions.workspaceRoot, fedOptions.federationConfig);
13
- if (!existsSync(fullConfigPath)) {
8
+ const fullConfigPath = __rspack_external_path.join(fedOptions.workspaceRoot, fedOptions.federationConfig);
9
+ if (!__rspack_external_fs.existsSync(fullConfigPath)) {
14
10
  throw new Error('Expected ' + fullConfigPath);
15
11
  }
16
12
  const config = await import(`${fullConfigPath}`);
@@ -9,15 +9,18 @@ const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
9
9
  // The require scope
10
10
  var __webpack_require__ = {};
11
11
 
12
- /************************************************************************/
13
12
  // webpack/runtime/define_property_getters
14
13
  (() => {
15
- __webpack_require__.d = (exports, definition) => {
16
- for(var key in definition) {
17
- if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
18
- Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
19
- }
20
- }
14
+ __webpack_require__.d = (exports, getters, values) => {
15
+ var define = (defs, kind) => {
16
+ for(var key in defs) {
17
+ if(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {
18
+ Object.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });
19
+ }
20
+ }
21
+ };
22
+ define(getters, "get");
23
+ define(values, "value");
21
24
  };
22
25
  })();
23
26
  // webpack/runtime/has_own_property
@@ -34,7 +37,6 @@ __webpack_require__.r = (exports) => {
34
37
  Object.defineProperty(exports, '__esModule', { value: true });
35
38
  };
36
39
  })();
37
- /************************************************************************/
38
40
  var __webpack_exports__ = {};
39
41
  // ESM COMPAT FLAG
40
42
  __webpack_require__.r(__webpack_exports__);
@@ -57,9 +59,9 @@ function writeFederationInfo(federationInfo, fedOptions) {
57
59
  }
58
60
 
59
61
  exports.writeFederationInfo = __webpack_exports__.writeFederationInfo;
60
- for(var __webpack_i__ in __webpack_exports__) {
61
- if(["writeFederationInfo"].indexOf(__webpack_i__) === -1) {
62
- exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
62
+ for(var __rspack_i in __webpack_exports__) {
63
+ if(["writeFederationInfo"].indexOf(__rspack_i) === -1) {
64
+ exports[__rspack_i] = __webpack_exports__[__rspack_i];
63
65
  }
64
66
  }
65
67
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,16 +1,12 @@
1
- import { join } from "path";
2
- import { writeFileSync } from "fs";
1
+ import * as __rspack_external_path from "path";
2
+ import * as __rspack_external_fs from "fs";
3
3
 
4
- ;// CONCATENATED MODULE: external "path"
5
4
 
6
- ;// CONCATENATED MODULE: external "fs"
7
-
8
- ;// CONCATENATED MODULE: ./src/lib/core/write-federation-info.ts
9
5
 
10
6
 
11
7
  function writeFederationInfo(federationInfo, fedOptions) {
12
- const metaDataPath = join(fedOptions.workspaceRoot, fedOptions.outputPath, 'remoteEntry.json');
13
- writeFileSync(metaDataPath, JSON.stringify(federationInfo, null, 2));
8
+ const metaDataPath = __rspack_external_path.join(fedOptions.workspaceRoot, fedOptions.outputPath, 'remoteEntry.json');
9
+ __rspack_external_fs.writeFileSync(metaDataPath, JSON.stringify(federationInfo, null, 2));
14
10
  }
15
11
 
16
12
  export { writeFederationInfo };
@@ -9,7 +9,6 @@ const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
9
9
  // The require scope
10
10
  var __webpack_require__ = {};
11
11
 
12
- /************************************************************************/
13
12
  // webpack/runtime/compat_get_default_export
14
13
  (() => {
15
14
  // getDefaultExport function for compatibility with non-ESM modules
@@ -24,12 +23,16 @@ __webpack_require__.n = (module) => {
24
23
  })();
25
24
  // webpack/runtime/define_property_getters
26
25
  (() => {
27
- __webpack_require__.d = (exports, definition) => {
28
- for(var key in definition) {
29
- if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
30
- Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
31
- }
32
- }
26
+ __webpack_require__.d = (exports, getters, values) => {
27
+ var define = (defs, kind) => {
28
+ for(var key in defs) {
29
+ if(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {
30
+ Object.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });
31
+ }
32
+ }
33
+ };
34
+ define(getters, "get");
35
+ define(values, "value");
33
36
  };
34
37
  })();
35
38
  // webpack/runtime/has_own_property
@@ -46,15 +49,14 @@ __webpack_require__.r = (exports) => {
46
49
  Object.defineProperty(exports, '__esModule', { value: true });
47
50
  };
48
51
  })();
49
- /************************************************************************/
50
52
  var __webpack_exports__ = {};
51
53
  // ESM COMPAT FLAG
52
54
  __webpack_require__.r(__webpack_exports__);
53
55
 
54
56
  // EXPORTS
55
57
  __webpack_require__.d(__webpack_exports__, {
56
- setLogLevel: () => (/* binding */ setLogLevel),
57
- logger: () => (/* binding */ logger)
58
+ logger: () => (/* binding */ logger),
59
+ setLogLevel: () => (/* binding */ setLogLevel)
58
60
  });
59
61
 
60
62
  ;// CONCATENATED MODULE: external "npmlog"
@@ -103,9 +105,9 @@ setLogLevel('info');
103
105
 
104
106
  exports.logger = __webpack_exports__.logger;
105
107
  exports.setLogLevel = __webpack_exports__.setLogLevel;
106
- for(var __webpack_i__ in __webpack_exports__) {
107
- if(["logger","setLogLevel"].indexOf(__webpack_i__) === -1) {
108
- exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
108
+ for(var __rspack_i in __webpack_exports__) {
109
+ if(["logger","setLogLevel"].indexOf(__rspack_i) === -1) {
110
+ exports[__rspack_i] = __webpack_exports__[__rspack_i];
109
111
  }
110
112
  }
111
113
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,8 +1,6 @@
1
1
  import npmlog from "npmlog";
2
2
 
3
- ;// CONCATENATED MODULE: external "npmlog"
4
3
 
5
- ;// CONCATENATED MODULE: ./src/lib/utils/logger.ts
6
4
  /* eslint-disable @typescript-eslint/no-explicit-any */ //@ts-ignore
7
5
 
8
6
  const levels = npmlog.levels;
@@ -9,15 +9,18 @@ const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
9
9
  // The require scope
10
10
  var __webpack_require__ = {};
11
11
 
12
- /************************************************************************/
13
12
  // webpack/runtime/define_property_getters
14
13
  (() => {
15
- __webpack_require__.d = (exports, definition) => {
16
- for(var key in definition) {
17
- if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
18
- Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
19
- }
20
- }
14
+ __webpack_require__.d = (exports, getters, values) => {
15
+ var define = (defs, kind) => {
16
+ for(var key in defs) {
17
+ if(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {
18
+ Object.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });
19
+ }
20
+ }
21
+ };
22
+ define(getters, "get");
23
+ define(values, "value");
21
24
  };
22
25
  })();
23
26
  // webpack/runtime/has_own_property
@@ -34,7 +37,6 @@ __webpack_require__.r = (exports) => {
34
37
  Object.defineProperty(exports, '__esModule', { value: true });
35
38
  };
36
39
  })();
37
- /************************************************************************/
38
40
  var __webpack_exports__ = {};
39
41
  // ESM COMPAT FLAG
40
42
  __webpack_require__.r(__webpack_exports__);
@@ -55,7 +57,6 @@ const external_json5_namespaceObject = require("json5");
55
57
 
56
58
 
57
59
  function getMappedPaths({ rootTsConfigPath, sharedMappings = [], rootPath }) {
58
- var _tsConfig_compilerOptions;
59
60
  const result = [];
60
61
  if (!external_path_namespaceObject.isAbsolute(rootTsConfigPath)) {
61
62
  throw new Error('SharedMappings.register: tsConfigPath needs to be an absolute path!');
@@ -67,7 +68,7 @@ function getMappedPaths({ rootTsConfigPath, sharedMappings = [], rootPath }) {
67
68
  const tsConfig = external_json5_namespaceObject.parse(external_fs_namespaceObject.readFileSync(rootTsConfigPath, {
68
69
  encoding: 'utf-8'
69
70
  }));
70
- const mappings = tsConfig === null || tsConfig === void 0 ? void 0 : (_tsConfig_compilerOptions = tsConfig.compilerOptions) === null || _tsConfig_compilerOptions === void 0 ? void 0 : _tsConfig_compilerOptions.paths;
71
+ const mappings = tsConfig?.compilerOptions?.paths;
71
72
  if (!mappings) {
72
73
  return result;
73
74
  }
@@ -86,9 +87,9 @@ function getMappedPaths({ rootTsConfigPath, sharedMappings = [], rootPath }) {
86
87
  }
87
88
 
88
89
  exports.getMappedPaths = __webpack_exports__.getMappedPaths;
89
- for(var __webpack_i__ in __webpack_exports__) {
90
- if(["getMappedPaths"].indexOf(__webpack_i__) === -1) {
91
- exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
90
+ for(var __rspack_i in __webpack_exports__) {
91
+ if(["getMappedPaths"].indexOf(__rspack_i) === -1) {
92
+ exports[__rspack_i] = __webpack_exports__[__rspack_i];
92
93
  }
93
94
  }
94
95
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,37 +1,31 @@
1
- import { dirname, isAbsolute, join, normalize } from "path";
2
- import { readFileSync } from "fs";
3
- import { parse } from "json5";
1
+ import * as __rspack_external_path from "path";
2
+ import * as __rspack_external_fs from "fs";
3
+ import * as __rspack_external_json5 from "json5";
4
4
 
5
- ;// CONCATENATED MODULE: external "path"
6
5
 
7
- ;// CONCATENATED MODULE: external "fs"
8
6
 
9
- ;// CONCATENATED MODULE: external "json5"
10
-
11
- ;// CONCATENATED MODULE: ./src/lib/utils/mapped-paths.ts
12
7
 
13
8
 
14
9
 
15
10
  function getMappedPaths({ rootTsConfigPath, sharedMappings = [], rootPath }) {
16
- var _tsConfig_compilerOptions;
17
11
  const result = [];
18
- if (!isAbsolute(rootTsConfigPath)) {
12
+ if (!__rspack_external_path.isAbsolute(rootTsConfigPath)) {
19
13
  throw new Error('SharedMappings.register: tsConfigPath needs to be an absolute path!');
20
14
  }
21
15
  if (!rootPath) {
22
- rootPath = normalize(dirname(rootTsConfigPath));
16
+ rootPath = __rspack_external_path.normalize(__rspack_external_path.dirname(rootTsConfigPath));
23
17
  }
24
18
  const shareAll = sharedMappings.length === 0;
25
- const tsConfig = parse(readFileSync(rootTsConfigPath, {
19
+ const tsConfig = __rspack_external_json5.parse(__rspack_external_fs.readFileSync(rootTsConfigPath, {
26
20
  encoding: 'utf-8'
27
21
  }));
28
- const mappings = tsConfig === null || tsConfig === void 0 ? void 0 : (_tsConfig_compilerOptions = tsConfig.compilerOptions) === null || _tsConfig_compilerOptions === void 0 ? void 0 : _tsConfig_compilerOptions.paths;
22
+ const mappings = tsConfig?.compilerOptions?.paths;
29
23
  if (!mappings) {
30
24
  return result;
31
25
  }
32
26
  for(const key in mappings){
33
27
  if (Object.prototype.hasOwnProperty.call(mappings, key)) {
34
- const libPath = normalize(join(rootPath, mappings[key][0]));
28
+ const libPath = __rspack_external_path.normalize(__rspack_external_path.join(rootPath, mappings[key][0]));
35
29
  if (sharedMappings.includes(key) || shareAll) {
36
30
  result.push({
37
31
  key,
@@ -9,15 +9,18 @@ const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
9
9
  // The require scope
10
10
  var __webpack_require__ = {};
11
11
 
12
- /************************************************************************/
13
12
  // webpack/runtime/define_property_getters
14
13
  (() => {
15
- __webpack_require__.d = (exports, definition) => {
16
- for(var key in definition) {
17
- if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
18
- Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
19
- }
20
- }
14
+ __webpack_require__.d = (exports, getters, values) => {
15
+ var define = (defs, kind) => {
16
+ for(var key in defs) {
17
+ if(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {
18
+ Object.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });
19
+ }
20
+ }
21
+ };
22
+ define(getters, "get");
23
+ define(values, "value");
21
24
  };
22
25
  })();
23
26
  // webpack/runtime/has_own_property
@@ -34,12 +37,8 @@ __webpack_require__.r = (exports) => {
34
37
  Object.defineProperty(exports, '__esModule', { value: true });
35
38
  };
36
39
  })();
37
- /************************************************************************/
38
40
  var __webpack_exports__ = {};
39
41
  __webpack_require__.r(__webpack_exports__);
40
- __webpack_require__.d(__webpack_exports__, {
41
- normalize: () => (normalize)
42
- });
43
42
  function normalize(path, trailingSlash) {
44
43
  let cand = path.replace(/\\/g, '/');
45
44
  if (typeof trailingSlash === 'undefined') {
@@ -54,10 +53,14 @@ function normalize(path, trailingSlash) {
54
53
  return cand;
55
54
  }
56
55
 
56
+ __webpack_require__.d(__webpack_exports__, {
57
+ normalize: () => (normalize)
58
+ });
59
+
57
60
  exports.normalize = __webpack_exports__.normalize;
58
- for(var __webpack_i__ in __webpack_exports__) {
59
- if(["normalize"].indexOf(__webpack_i__) === -1) {
60
- exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
61
+ for(var __rspack_i in __webpack_exports__) {
62
+ if(["normalize"].indexOf(__rspack_i) === -1) {
63
+ exports[__rspack_i] = __webpack_exports__[__rspack_i];
61
64
  }
62
65
  }
63
66
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,5 +1,3 @@
1
-
2
- ;// CONCATENATED MODULE: ./src/lib/utils/normalize.ts
3
1
  function normalize(path, trailingSlash) {
4
2
  let cand = path.replace(/\\/g, '/');
5
3
  if (typeof trailingSlash === 'undefined') {