@module-federation/sdk 0.0.0-next-20250709075526 → 0.0.0-next-20250709090625

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 (36) hide show
  1. package/dist/index.cjs +812 -0
  2. package/dist/index.js +656 -0
  3. package/dist/normalize-webpack-path.cjs +77 -0
  4. package/dist/{normalize-webpack-path.esm.js → normalize-webpack-path.js} +6 -15
  5. package/dist/{src/types → types}/plugins/ModuleFederationPlugin.d.ts +0 -4
  6. package/package.json +16 -22
  7. package/dist/index.cjs.cjs +0 -821
  8. package/dist/index.cjs.d.ts +0 -1
  9. package/dist/index.esm.d.ts +0 -1
  10. package/dist/index.esm.js +0 -771
  11. package/dist/normalize-webpack-path.cjs.cjs +0 -42
  12. package/dist/normalize-webpack-path.cjs.d.ts +0 -1
  13. package/dist/normalize-webpack-path.esm.d.ts +0 -1
  14. package/dist/polyfills.cjs.cjs +0 -14
  15. package/dist/polyfills.esm.js +0 -12
  16. /package/dist/{src/constant.d.ts → constant.d.ts} +0 -0
  17. /package/dist/{src/createModuleFederationConfig.d.ts → createModuleFederationConfig.d.ts} +0 -0
  18. /package/dist/{src/dom.d.ts → dom.d.ts} +0 -0
  19. /package/dist/{src/env.d.ts → env.d.ts} +0 -0
  20. /package/dist/{src/generateSnapshotFromManifest.d.ts → generateSnapshotFromManifest.d.ts} +0 -0
  21. /package/dist/{src/index.d.ts → index.d.ts} +0 -0
  22. /package/dist/{src/logger.d.ts → logger.d.ts} +0 -0
  23. /package/dist/{src/node.d.ts → node.d.ts} +0 -0
  24. /package/dist/{src/normalize-webpack-path.d.ts → normalize-webpack-path.d.ts} +0 -0
  25. /package/dist/{src/normalizeOptions.d.ts → normalizeOptions.d.ts} +0 -0
  26. /package/dist/{src/types → types}/common.d.ts +0 -0
  27. /package/dist/{src/types → types}/hooks.d.ts +0 -0
  28. /package/dist/{src/types → types}/index.d.ts +0 -0
  29. /package/dist/{src/types → types}/manifest.d.ts +0 -0
  30. /package/dist/{src/types → types}/plugins/ContainerPlugin.d.ts +0 -0
  31. /package/dist/{src/types → types}/plugins/ContainerReferencePlugin.d.ts +0 -0
  32. /package/dist/{src/types → types}/plugins/SharePlugin.d.ts +0 -0
  33. /package/dist/{src/types → types}/plugins/index.d.ts +0 -0
  34. /package/dist/{src/types → types}/snapshot.d.ts +0 -0
  35. /package/dist/{src/types → types}/stats.d.ts +0 -0
  36. /package/dist/{src/utils.d.ts → utils.d.ts} +0 -0
@@ -1,42 +0,0 @@
1
- 'use strict';
2
-
3
- var path = require('path');
4
-
5
- function getWebpackPath(compiler, options = {
6
- framework: 'other'
7
- }) {
8
- try {
9
- // @ts-ignore just throw err
10
- compiler.webpack();
11
- return '';
12
- } catch (err) {
13
- var _err_stack;
14
- const trace = ((_err_stack = err.stack) == null ? void 0 : _err_stack.split('\n')) || [];
15
- const webpackErrLocation = trace.find((item)=>item.includes('at webpack')) || '';
16
- const webpackLocationWithDetail = webpackErrLocation.replace(/[^\(\)]+/, '').slice(1, -1);
17
- const webpackPath = webpackLocationWithDetail.split(':').slice(0, -2).join(':');
18
- if ((options == null ? void 0 : options.framework) === 'nextjs') {
19
- if (webpackPath.endsWith('webpack.js')) {
20
- return webpackPath.replace('webpack.js', 'index.js');
21
- }
22
- return '';
23
- }
24
- return require.resolve('webpack', {
25
- paths: [
26
- webpackPath
27
- ]
28
- });
29
- }
30
- }
31
- const normalizeWebpackPath = (fullPath)=>{
32
- if (fullPath === 'webpack') {
33
- return process.env['FEDERATION_WEBPACK_PATH'] || fullPath;
34
- }
35
- if (process.env['FEDERATION_WEBPACK_PATH']) {
36
- return path.resolve(process.env['FEDERATION_WEBPACK_PATH'], fullPath.replace('webpack', '../../'));
37
- }
38
- return fullPath;
39
- };
40
-
41
- exports.getWebpackPath = getWebpackPath;
42
- exports.normalizeWebpackPath = normalizeWebpackPath;
@@ -1 +0,0 @@
1
- export * from "./src/normalize-webpack-path";
@@ -1 +0,0 @@
1
- export * from "./src/normalize-webpack-path";
@@ -1,14 +0,0 @@
1
- 'use strict';
2
-
3
- function _extends() {
4
- _extends = Object.assign || function assign(target) {
5
- for(var i = 1; i < arguments.length; i++){
6
- var source = arguments[i];
7
- for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
8
- }
9
- return target;
10
- };
11
- return _extends.apply(this, arguments);
12
- }
13
-
14
- exports._ = _extends;
@@ -1,12 +0,0 @@
1
- function _extends() {
2
- _extends = Object.assign || function assign(target) {
3
- for(var i = 1; i < arguments.length; i++){
4
- var source = arguments[i];
5
- for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
6
- }
7
- return target;
8
- };
9
- return _extends.apply(this, arguments);
10
- }
11
-
12
- export { _extends as _ };
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes