@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
@@ -1,26 +1,19 @@
1
1
  import { createRequire } from 'module';
2
- import 'path';
3
- export default ((path, options = {})=>{
4
- const p = options.path || void 0;
5
- const mode = options.mode || 'esm';
6
- if ('cjs' === mode) {
7
- const require = createRequire(import.meta.url);
8
- if (!p) return require.resolve(path);
9
- return require.resolve(path, {
10
- paths: [
11
- p
12
- ]
13
- });
14
- }
2
+ import nodePath from 'path';
3
+ export default (path, options = {}) => {
4
+ const p = options.path || undefined;
5
+ const mode = options.mode || 'esm';
6
+ if (mode === 'cjs') {
7
+ const require = createRequire(import.meta.url);
8
+ if (!p) return require.resolve(path);
9
+ return require.resolve(path, { paths: [p] });
10
+ } else {
15
11
  try {
16
- return import.meta.resolve(path.join(p, path)).replace(/^file:\/\//, '');
12
+ return import.meta.resolve(path.join(p, path)).replace(/^file:\/\//, '');
17
13
  } catch (e) {
18
- const require = createRequire(import.meta.url);
19
- if (!p) return require.resolve(path);
20
- return require.resolve(path, {
21
- paths: [
22
- p
23
- ]
24
- });
14
+ const require = createRequire(import.meta.url);
15
+ if (!p) return require.resolve(path);
16
+ return require.resolve(path, { paths: [p] });
25
17
  }
26
- });
18
+ }
19
+ };
@@ -0,0 +1,31 @@
1
+
2
+ var __webpack_modules__ = {};
3
+ // The module cache
4
+ var __webpack_module_cache__ = {};
5
+ // The require function
6
+ function __webpack_require__(moduleId) {
7
+ // Check if module is in cache
8
+ var cachedModule = __webpack_module_cache__[moduleId];
9
+ if (cachedModule !== undefined) {
10
+ return cachedModule.exports;
11
+ }
12
+ // Create a new module (and put it into the cache)
13
+ var module = (__webpack_module_cache__[moduleId] = {
14
+ exports: {}
15
+ });
16
+ // Execute the module function
17
+ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
18
+
19
+ // Return the exports of the module
20
+ return module.exports;
21
+ }
22
+ // expose the modules object (__webpack_modules__)
23
+ __webpack_require__.m = __webpack_modules__;
24
+
25
+ // webpack/runtime/esm_register_module
26
+ (() => {
27
+ __webpack_require__.add = function registerModules(modules) { Object.assign(__webpack_require__.m, modules) }
28
+
29
+ })();
30
+
31
+ export { __webpack_require__ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/esbuild",
3
- "version": "0.0.0-perf-devtools-20260107043700",
3
+ "version": "0.0.0-perf-website-code-usage-20260914033703",
4
4
  "author": "Zack Jackson (@ScriptedAlchemy)",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -50,17 +50,26 @@
50
50
  }
51
51
  },
52
52
  "dependencies": {
53
- "@chialab/esbuild-plugin-commonjs": "^0.18.0",
54
- "@hyrious/esbuild-plugin-commonjs": "^0.2.4",
55
- "cjs-module-lexer": "^1.3.1",
56
- "enhanced-resolve": "^5.16.1",
57
- "es-module-lexer": "^1.5.3",
58
- "esbuild": "^0.25.0",
59
- "json5": "^2.2.3",
60
- "npmlog": "^7.0.1",
61
- "@module-federation/sdk": "0.0.0-perf-devtools-20260107043700"
53
+ "@chialab/esbuild-plugin-commonjs": "0.18.0",
54
+ "@hyrious/esbuild-plugin-commonjs": "0.2.4",
55
+ "cjs-module-lexer": "1.3.1",
56
+ "enhanced-resolve": "5.16.1",
57
+ "es-module-lexer": "1.5.3",
58
+ "esbuild": "0.28.1",
59
+ "json5": "2.2.3",
60
+ "npmlog": "7.0.1",
61
+ "@module-federation/sdk": "0.0.0-perf-website-code-usage-20260914033703",
62
+ "@module-federation/webpack-bundler-runtime": "0.0.0-perf-website-code-usage-20260914033703",
63
+ "@module-federation/runtime": "0.0.0-perf-website-code-usage-20260914033703"
62
64
  },
63
65
  "devDependencies": {
64
- "@rslib/core": "^0.12.4"
66
+ "@rslib/core": "^0.23.2",
67
+ "typescript": "7.0.2"
68
+ },
69
+ "scripts": {
70
+ "build": "rslib build",
71
+ "lint": "ESLINT_USE_FLAT_CONFIG=false pnpm exec eslint --ignore-pattern node_modules \"**/*.ts\" \"package.json\"",
72
+ "build-debug": "FEDERATION_DEBUG=true rslib build",
73
+ "pre-release": "pnpm run build"
65
74
  }
66
75
  }