@module-federation/esbuild 0.0.0-perf-devtools-20260107043700 → 0.0.0-perf-website-code-usage-20260914033703

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 (62) hide show
  1. package/dist/adapters/lib/collect-exports.js +153 -0
  2. package/dist/adapters/lib/collect-exports.mjs +80 -0
  3. package/dist/adapters/lib/commonjs.js +258 -0
  4. package/dist/adapters/lib/commonjs.mjs +182 -0
  5. package/dist/adapters/lib/containerPlugin.js +233 -0
  6. package/dist/adapters/lib/containerPlugin.mjs +179 -0
  7. package/dist/adapters/lib/containerReference.js +257 -0
  8. package/dist/adapters/lib/containerReference.mjs +188 -0
  9. package/dist/adapters/lib/lexer.js +187 -0
  10. package/dist/adapters/lib/lexer.mjs +136 -0
  11. package/dist/adapters/lib/linkRemotesPlugin.js +117 -0
  12. package/dist/adapters/lib/linkRemotesPlugin.mjs +48 -0
  13. package/dist/adapters/lib/manifest.js +227 -0
  14. package/dist/adapters/lib/manifest.mjs +159 -0
  15. package/dist/adapters/lib/plugin.js +340 -0
  16. package/dist/adapters/lib/plugin.mjs +247 -0
  17. package/dist/adapters/lib/react-replacements.js +86 -0
  18. package/dist/adapters/lib/react-replacements.mjs +34 -0
  19. package/dist/adapters/lib/transform.js +171 -0
  20. package/dist/adapters/lib/transform.mjs +116 -0
  21. package/dist/adapters/lib/utils.js +87 -0
  22. package/dist/adapters/lib/utils.mjs +31 -0
  23. package/dist/build.js +132 -473
  24. package/dist/build.mjs +12 -380
  25. package/dist/index.js +45 -26
  26. package/dist/index.mjs +3 -2
  27. package/dist/lib/config/configuration-context.js +73 -0
  28. package/dist/lib/config/configuration-context.mjs +18 -0
  29. package/dist/lib/config/federation-config.js +29 -0
  30. package/dist/lib/config/federation-config.mjs +3 -0
  31. package/dist/lib/config/share-utils.js +340 -0
  32. package/dist/lib/config/share-utils.mjs +245 -0
  33. package/dist/lib/config/with-native-federation.js +120 -0
  34. package/dist/lib/config/with-native-federation.mjs +66 -0
  35. package/dist/lib/core/build-adapter.js +72 -0
  36. package/dist/lib/core/build-adapter.mjs +16 -0
  37. package/dist/lib/core/createContainerTemplate.js +235 -0
  38. package/dist/lib/core/createContainerTemplate.mjs +183 -0
  39. package/dist/lib/core/default-skip-list.js +103 -0
  40. package/dist/lib/core/default-skip-list.mjs +45 -0
  41. package/dist/lib/core/federation-options.js +29 -0
  42. package/dist/lib/core/federation-options.mjs +3 -0
  43. package/dist/lib/core/get-externals.js +68 -0
  44. package/dist/lib/core/get-externals.mjs +17 -0
  45. package/dist/lib/core/load-federation-config.js +71 -0
  46. package/dist/lib/core/load-federation-config.mjs +16 -0
  47. package/dist/lib/core/write-federation-info.js +67 -0
  48. package/dist/lib/core/write-federation-info.mjs +12 -0
  49. package/dist/lib/utils/logger.js +113 -0
  50. package/dist/lib/utils/logger.mjs +44 -0
  51. package/dist/lib/utils/mapped-paths.js +95 -0
  52. package/dist/lib/utils/mapped-paths.mjs +40 -0
  53. package/dist/lib/utils/normalize.js +66 -0
  54. package/dist/lib/utils/normalize.mjs +15 -0
  55. package/dist/lib/utils/package-info.js +325 -0
  56. package/dist/lib/utils/package-info.mjs +259 -0
  57. package/dist/plugin.d.ts +1 -0
  58. package/dist/plugin.js +82 -1233
  59. package/dist/plugin.mjs +2 -1188
  60. package/dist/resolve/esm-resolver.mjs +15 -22
  61. package/dist/rslib-runtime.mjs +31 -0
  62. package/package.json +20 -11
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
3
+ return typeof document === 'undefined'
4
+ ? new (require('url'.replace('', '')).URL)('file:' + __filename).href
5
+ : (document.currentScript && document.currentScript.src) ||
6
+ new URL('main.js', document.baseURI).href;
7
+ })();
8
+ ;
9
+ // The require scope
10
+ var __webpack_require__ = {};
11
+
12
+ // webpack/runtime/define_property_getters
13
+ (() => {
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");
24
+ };
25
+ })();
26
+ // webpack/runtime/has_own_property
27
+ (() => {
28
+ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
29
+ })();
30
+ // webpack/runtime/make_namespace_object
31
+ (() => {
32
+ // define __esModule on exports
33
+ __webpack_require__.r = (exports) => {
34
+ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
35
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
36
+ }
37
+ Object.defineProperty(exports, '__esModule', { value: true });
38
+ };
39
+ })();
40
+ var __webpack_exports__ = {};
41
+ // ESM COMPAT FLAG
42
+ __webpack_require__.r(__webpack_exports__);
43
+
44
+ // EXPORTS
45
+ __webpack_require__.d(__webpack_exports__, {
46
+ getMappedPaths: () => (/* binding */ getMappedPaths)
47
+ });
48
+
49
+ ;// CONCATENATED MODULE: external "path"
50
+ const external_path_namespaceObject = require("path");
51
+ ;// CONCATENATED MODULE: external "fs"
52
+ const external_fs_namespaceObject = require("fs");
53
+ ;// CONCATENATED MODULE: external "json5"
54
+ const external_json5_namespaceObject = require("json5");
55
+ ;// CONCATENATED MODULE: ./src/lib/utils/mapped-paths.ts
56
+
57
+
58
+
59
+ function getMappedPaths({ rootTsConfigPath, sharedMappings = [], rootPath }) {
60
+ const result = [];
61
+ if (!external_path_namespaceObject.isAbsolute(rootTsConfigPath)) {
62
+ throw new Error('SharedMappings.register: tsConfigPath needs to be an absolute path!');
63
+ }
64
+ if (!rootPath) {
65
+ rootPath = external_path_namespaceObject.normalize(external_path_namespaceObject.dirname(rootTsConfigPath));
66
+ }
67
+ const shareAll = sharedMappings.length === 0;
68
+ const tsConfig = external_json5_namespaceObject.parse(external_fs_namespaceObject.readFileSync(rootTsConfigPath, {
69
+ encoding: 'utf-8'
70
+ }));
71
+ const mappings = tsConfig?.compilerOptions?.paths;
72
+ if (!mappings) {
73
+ return result;
74
+ }
75
+ for(const key in mappings){
76
+ if (Object.prototype.hasOwnProperty.call(mappings, key)) {
77
+ const libPath = external_path_namespaceObject.normalize(external_path_namespaceObject.join(rootPath, mappings[key][0]));
78
+ if (sharedMappings.includes(key) || shareAll) {
79
+ result.push({
80
+ key,
81
+ path: libPath
82
+ });
83
+ }
84
+ }
85
+ }
86
+ return result;
87
+ }
88
+
89
+ exports.getMappedPaths = __webpack_exports__.getMappedPaths;
90
+ for(var __rspack_i in __webpack_exports__) {
91
+ if(["getMappedPaths"].indexOf(__rspack_i) === -1) {
92
+ exports[__rspack_i] = __webpack_exports__[__rspack_i];
93
+ }
94
+ }
95
+ Object.defineProperty(exports, '__esModule', { value: true });
@@ -0,0 +1,40 @@
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
+
5
+
6
+
7
+
8
+
9
+
10
+ function getMappedPaths({ rootTsConfigPath, sharedMappings = [], rootPath }) {
11
+ const result = [];
12
+ if (!__rspack_external_path.isAbsolute(rootTsConfigPath)) {
13
+ throw new Error('SharedMappings.register: tsConfigPath needs to be an absolute path!');
14
+ }
15
+ if (!rootPath) {
16
+ rootPath = __rspack_external_path.normalize(__rspack_external_path.dirname(rootTsConfigPath));
17
+ }
18
+ const shareAll = sharedMappings.length === 0;
19
+ const tsConfig = __rspack_external_json5.parse(__rspack_external_fs.readFileSync(rootTsConfigPath, {
20
+ encoding: 'utf-8'
21
+ }));
22
+ const mappings = tsConfig?.compilerOptions?.paths;
23
+ if (!mappings) {
24
+ return result;
25
+ }
26
+ for(const key in mappings){
27
+ if (Object.prototype.hasOwnProperty.call(mappings, key)) {
28
+ const libPath = __rspack_external_path.normalize(__rspack_external_path.join(rootPath, mappings[key][0]));
29
+ if (sharedMappings.includes(key) || shareAll) {
30
+ result.push({
31
+ key,
32
+ path: libPath
33
+ });
34
+ }
35
+ }
36
+ }
37
+ return result;
38
+ }
39
+
40
+ export { getMappedPaths };
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
3
+ return typeof document === 'undefined'
4
+ ? new (require('url'.replace('', '')).URL)('file:' + __filename).href
5
+ : (document.currentScript && document.currentScript.src) ||
6
+ new URL('main.js', document.baseURI).href;
7
+ })();
8
+ ;
9
+ // The require scope
10
+ var __webpack_require__ = {};
11
+
12
+ // webpack/runtime/define_property_getters
13
+ (() => {
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");
24
+ };
25
+ })();
26
+ // webpack/runtime/has_own_property
27
+ (() => {
28
+ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
29
+ })();
30
+ // webpack/runtime/make_namespace_object
31
+ (() => {
32
+ // define __esModule on exports
33
+ __webpack_require__.r = (exports) => {
34
+ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
35
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
36
+ }
37
+ Object.defineProperty(exports, '__esModule', { value: true });
38
+ };
39
+ })();
40
+ var __webpack_exports__ = {};
41
+ __webpack_require__.r(__webpack_exports__);
42
+ function normalize(path, trailingSlash) {
43
+ let cand = path.replace(/\\/g, '/');
44
+ if (typeof trailingSlash === 'undefined') {
45
+ return cand;
46
+ }
47
+ while(cand.endsWith('/')){
48
+ cand = cand.substring(0, cand.length - 1);
49
+ }
50
+ if (trailingSlash) {
51
+ return cand + '/';
52
+ }
53
+ return cand;
54
+ }
55
+
56
+ __webpack_require__.d(__webpack_exports__, {
57
+ normalize: () => (normalize)
58
+ });
59
+
60
+ exports.normalize = __webpack_exports__.normalize;
61
+ for(var __rspack_i in __webpack_exports__) {
62
+ if(["normalize"].indexOf(__rspack_i) === -1) {
63
+ exports[__rspack_i] = __webpack_exports__[__rspack_i];
64
+ }
65
+ }
66
+ Object.defineProperty(exports, '__esModule', { value: true });
@@ -0,0 +1,15 @@
1
+ function normalize(path, trailingSlash) {
2
+ let cand = path.replace(/\\/g, '/');
3
+ if (typeof trailingSlash === 'undefined') {
4
+ return cand;
5
+ }
6
+ while(cand.endsWith('/')){
7
+ cand = cand.substring(0, cand.length - 1);
8
+ }
9
+ if (trailingSlash) {
10
+ return cand + '/';
11
+ }
12
+ return cand;
13
+ }
14
+
15
+ export { normalize };
@@ -0,0 +1,325 @@
1
+ "use strict";
2
+ const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
3
+ return typeof document === 'undefined'
4
+ ? new (require('url'.replace('', '')).URL)('file:' + __filename).href
5
+ : (document.currentScript && document.currentScript.src) ||
6
+ new URL('main.js', document.baseURI).href;
7
+ })();
8
+ ;
9
+ // The require scope
10
+ var __webpack_require__ = {};
11
+
12
+ // webpack/runtime/define_property_getters
13
+ (() => {
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");
24
+ };
25
+ })();
26
+ // webpack/runtime/has_own_property
27
+ (() => {
28
+ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
29
+ })();
30
+ // webpack/runtime/make_namespace_object
31
+ (() => {
32
+ // define __esModule on exports
33
+ __webpack_require__.r = (exports) => {
34
+ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
35
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
36
+ }
37
+ Object.defineProperty(exports, '__esModule', { value: true });
38
+ };
39
+ })();
40
+ var __webpack_exports__ = {};
41
+ // ESM COMPAT FLAG
42
+ __webpack_require__.r(__webpack_exports__);
43
+
44
+ // EXPORTS
45
+ __webpack_require__.d(__webpack_exports__, {
46
+ _getPackageInfo: () => (/* binding */ _getPackageInfo),
47
+ expandFolders: () => (/* binding */ expandFolders),
48
+ findDepPackageJson: () => (/* binding */ findDepPackageJson),
49
+ findPackageJsonFiles: () => (/* binding */ findPackageJsonFiles),
50
+ getPackageInfo: () => (/* binding */ getPackageInfo),
51
+ getPackageJsonFiles: () => (/* binding */ getPackageJsonFiles),
52
+ getVersionMaps: () => (/* binding */ getVersionMaps)
53
+ });
54
+
55
+ ;// CONCATENATED MODULE: external "fs"
56
+ const external_fs_namespaceObject = require("fs");
57
+ ;// CONCATENATED MODULE: external "path"
58
+ const external_path_namespaceObject = require("path");
59
+ ;// CONCATENATED MODULE: external "./logger.js"
60
+ const external_logger_js_namespaceObject = require("./logger.js");
61
+ ;// CONCATENATED MODULE: external "./normalize.js"
62
+ const external_normalize_js_namespaceObject = require("./normalize.js");
63
+ ;// CONCATENATED MODULE: ./src/lib/utils/package-info.ts
64
+
65
+
66
+
67
+
68
+ const packageCache = {};
69
+ function findPackageJsonFiles(project, workspace) {
70
+ return expandFolders(project, workspace).map((f)=>external_path_namespaceObject.join(f, 'package.json')).filter((f)=>external_fs_namespaceObject.existsSync(f));
71
+ }
72
+ function expandFolders(child, parent) {
73
+ const result = [];
74
+ parent = (0,external_normalize_js_namespaceObject.normalize)(parent, true);
75
+ child = (0,external_normalize_js_namespaceObject.normalize)(child, true);
76
+ if (!child.startsWith(parent)) {
77
+ throw new Error(`Workspace folder ${parent} needs to be a parent of the project folder ${child}`);
78
+ }
79
+ let current = child;
80
+ while(current !== parent){
81
+ result.push(current);
82
+ const cand = (0,external_normalize_js_namespaceObject.normalize)(external_path_namespaceObject.dirname(current), true);
83
+ if (cand === current) {
84
+ break;
85
+ }
86
+ current = cand;
87
+ }
88
+ result.push(parent);
89
+ return result;
90
+ }
91
+ function getPackageInfo(packageName, workspaceRoot) {
92
+ workspaceRoot = (0,external_normalize_js_namespaceObject.normalize)(workspaceRoot, true);
93
+ const packageJsonInfos = getPackageJsonFiles(workspaceRoot, workspaceRoot);
94
+ for (const info of packageJsonInfos){
95
+ const cand = _getPackageInfo(packageName, info.directory);
96
+ if (cand) {
97
+ return cand;
98
+ }
99
+ }
100
+ external_logger_js_namespaceObject.logger.warn('No meta data found for shared lib ' + packageName);
101
+ return null;
102
+ }
103
+ function getVersionMapCacheKey(project, workspace) {
104
+ return `${project}**${workspace}`;
105
+ }
106
+ function getVersionMaps(project, workspace) {
107
+ return getPackageJsonFiles(project, workspace).map((json)=>({
108
+ ...json.content['dependencies']
109
+ }));
110
+ }
111
+ function getPackageJsonFiles(project, workspace) {
112
+ const cacheKey = getVersionMapCacheKey(project, workspace);
113
+ let maps = packageCache[cacheKey];
114
+ if (maps) {
115
+ return maps;
116
+ }
117
+ maps = findPackageJsonFiles(project, workspace).map((f)=>{
118
+ const content = JSON.parse(external_fs_namespaceObject.readFileSync(f, 'utf-8'));
119
+ const directory = (0,external_normalize_js_namespaceObject.normalize)(external_path_namespaceObject.dirname(f), true);
120
+ const result = {
121
+ content,
122
+ directory
123
+ };
124
+ return result;
125
+ });
126
+ packageCache[cacheKey] = maps;
127
+ return maps;
128
+ }
129
+ function findDepPackageJson(packageName, projectRoot) {
130
+ const mainPkgName = getPkgFolder(packageName);
131
+ let mainPkgPath = external_path_namespaceObject.join(projectRoot, 'node_modules', mainPkgName);
132
+ let mainPkgJsonPath = external_path_namespaceObject.join(mainPkgPath, 'package.json');
133
+ let directory = projectRoot;
134
+ while(external_path_namespaceObject.dirname(directory) !== directory){
135
+ if (external_fs_namespaceObject.existsSync(mainPkgJsonPath)) {
136
+ break;
137
+ }
138
+ directory = (0,external_normalize_js_namespaceObject.normalize)(external_path_namespaceObject.dirname(directory), true);
139
+ mainPkgPath = external_path_namespaceObject.join(directory, 'node_modules', mainPkgName);
140
+ mainPkgJsonPath = external_path_namespaceObject.join(mainPkgPath, 'package.json');
141
+ }
142
+ if (!external_fs_namespaceObject.existsSync(mainPkgJsonPath)) {
143
+ external_logger_js_namespaceObject.logger.verbose('No package.json found for ' + packageName + ' in ' + mainPkgPath);
144
+ return null;
145
+ }
146
+ return mainPkgJsonPath;
147
+ }
148
+ function _getPackageInfo(packageName, directory) {
149
+ const mainPkgName = getPkgFolder(packageName);
150
+ const mainPkgJsonPath = findDepPackageJson(packageName, directory);
151
+ if (!mainPkgJsonPath) {
152
+ return null;
153
+ }
154
+ const mainPkgPath = external_path_namespaceObject.dirname(mainPkgJsonPath);
155
+ const mainPkgJson = readJson(mainPkgJsonPath);
156
+ const version = mainPkgJson['version'];
157
+ const esm = mainPkgJson['type'] === 'module';
158
+ if (!version) {
159
+ external_logger_js_namespaceObject.logger.warn('No version found for ' + packageName);
160
+ return null;
161
+ }
162
+ let relSecondaryPath = external_path_namespaceObject.relative(mainPkgName, packageName);
163
+ if (!relSecondaryPath) {
164
+ relSecondaryPath = '.';
165
+ } else {
166
+ relSecondaryPath = './' + relSecondaryPath.replace(/\\/g, '/');
167
+ }
168
+ let cand = mainPkgJson?.exports?.[relSecondaryPath];
169
+ if (typeof cand === 'string') {
170
+ return {
171
+ entryPoint: external_path_namespaceObject.join(mainPkgPath, cand),
172
+ packageName,
173
+ version,
174
+ esm
175
+ };
176
+ }
177
+ cand = mainPkgJson?.exports?.[relSecondaryPath]?.import;
178
+ if (typeof cand === 'object') {
179
+ if (cand.module) {
180
+ cand = cand.module;
181
+ } else if (cand.import) {
182
+ cand = cand.import;
183
+ } else if (cand.default) {
184
+ cand = cand.default;
185
+ } else {
186
+ cand = null;
187
+ }
188
+ }
189
+ if (cand) {
190
+ if (typeof cand === 'object') {
191
+ if (cand.module) {
192
+ cand = cand.module;
193
+ } else if (cand.import) {
194
+ cand = cand.import;
195
+ } else if (cand.default) {
196
+ cand = cand.default;
197
+ } else {
198
+ cand = null;
199
+ }
200
+ }
201
+ return {
202
+ entryPoint: external_path_namespaceObject.join(mainPkgPath, cand),
203
+ packageName,
204
+ version,
205
+ esm
206
+ };
207
+ }
208
+ cand = mainPkgJson?.exports?.[relSecondaryPath]?.module;
209
+ if (typeof cand === 'object') {
210
+ if (cand.module) {
211
+ cand = cand.module;
212
+ } else if (cand.import) {
213
+ cand = cand.import;
214
+ } else if (cand.default) {
215
+ cand = cand.default;
216
+ } else {
217
+ cand = null;
218
+ }
219
+ }
220
+ if (cand) {
221
+ return {
222
+ entryPoint: external_path_namespaceObject.join(mainPkgPath, cand),
223
+ packageName,
224
+ version,
225
+ esm
226
+ };
227
+ }
228
+ cand = mainPkgJson?.exports?.[relSecondaryPath]?.default;
229
+ if (cand) {
230
+ if (typeof cand === 'object') {
231
+ if (cand.module) {
232
+ cand = cand.module;
233
+ } else if (cand.import) {
234
+ cand = cand.import;
235
+ } else if (cand.default) {
236
+ cand = cand.default;
237
+ } else {
238
+ cand = null;
239
+ }
240
+ }
241
+ return {
242
+ entryPoint: external_path_namespaceObject.join(mainPkgPath, cand),
243
+ packageName,
244
+ version,
245
+ esm
246
+ };
247
+ }
248
+ cand = mainPkgJson['module'];
249
+ if (cand && relSecondaryPath === '.') {
250
+ return {
251
+ entryPoint: external_path_namespaceObject.join(mainPkgPath, cand),
252
+ packageName,
253
+ version,
254
+ esm: true
255
+ };
256
+ }
257
+ const secondaryPgkPath = external_path_namespaceObject.join(mainPkgPath, relSecondaryPath);
258
+ const secondaryPgkJsonPath = external_path_namespaceObject.join(secondaryPgkPath, 'package.json');
259
+ let secondaryPgkJson = null;
260
+ if (external_fs_namespaceObject.existsSync(secondaryPgkJsonPath)) {
261
+ secondaryPgkJson = readJson(secondaryPgkJsonPath);
262
+ }
263
+ if (secondaryPgkJson && secondaryPgkJson.module) {
264
+ return {
265
+ entryPoint: external_path_namespaceObject.join(secondaryPgkPath, secondaryPgkJson.module),
266
+ packageName,
267
+ version,
268
+ esm: true
269
+ };
270
+ }
271
+ cand = external_path_namespaceObject.join(secondaryPgkPath, 'index.mjs');
272
+ if (external_fs_namespaceObject.existsSync(cand)) {
273
+ return {
274
+ entryPoint: cand,
275
+ packageName,
276
+ version,
277
+ esm: true
278
+ };
279
+ }
280
+ if (secondaryPgkJson && secondaryPgkJson.main) {
281
+ return {
282
+ entryPoint: external_path_namespaceObject.join(secondaryPgkPath, secondaryPgkJson.main),
283
+ packageName,
284
+ version,
285
+ esm
286
+ };
287
+ }
288
+ cand = external_path_namespaceObject.join(secondaryPgkPath, 'index.js');
289
+ if (external_fs_namespaceObject.existsSync(cand)) {
290
+ return {
291
+ entryPoint: cand,
292
+ packageName,
293
+ version,
294
+ esm
295
+ };
296
+ }
297
+ external_logger_js_namespaceObject.logger.warn('No entry point found for ' + packageName);
298
+ external_logger_js_namespaceObject.logger.warn("If you don't need this package, skip it in your federation.config.js or consider moving it into depDependencies in your package.json");
299
+ return null;
300
+ }
301
+ function readJson(mainPkgJsonPath) {
302
+ return JSON.parse(external_fs_namespaceObject.readFileSync(mainPkgJsonPath, 'utf-8'));
303
+ }
304
+ function getPkgFolder(packageName) {
305
+ const parts = packageName.split('/');
306
+ let folder = parts[0];
307
+ if (folder.startsWith('@')) {
308
+ folder += '/' + parts[1];
309
+ }
310
+ return folder;
311
+ }
312
+
313
+ exports._getPackageInfo = __webpack_exports__._getPackageInfo;
314
+ exports.expandFolders = __webpack_exports__.expandFolders;
315
+ exports.findDepPackageJson = __webpack_exports__.findDepPackageJson;
316
+ exports.findPackageJsonFiles = __webpack_exports__.findPackageJsonFiles;
317
+ exports.getPackageInfo = __webpack_exports__.getPackageInfo;
318
+ exports.getPackageJsonFiles = __webpack_exports__.getPackageJsonFiles;
319
+ exports.getVersionMaps = __webpack_exports__.getVersionMaps;
320
+ for(var __rspack_i in __webpack_exports__) {
321
+ if(["_getPackageInfo","expandFolders","findDepPackageJson","findPackageJsonFiles","getPackageInfo","getPackageJsonFiles","getVersionMaps"].indexOf(__rspack_i) === -1) {
322
+ exports[__rspack_i] = __webpack_exports__[__rspack_i];
323
+ }
324
+ }
325
+ Object.defineProperty(exports, '__esModule', { value: true });