@nx/module-federation 22.7.0-beta.1 → 22.7.0-beta.2
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.
- package/package.json +5 -5
- package/src/executors/utils/start-static-remotes-file-server.js +2 -1
- package/src/plugins/nx-module-federation-plugin/angular/nx-module-federation-dev-server-plugin.js +2 -1
- package/src/plugins/nx-module-federation-plugin/angular/nx-module-federation-plugin.d.ts.map +1 -1
- package/src/plugins/nx-module-federation-plugin/angular/nx-module-federation-plugin.js +8 -0
- package/src/plugins/nx-module-federation-plugin/angular/nx-module-federation-ssr-dev-server-plugin.js +2 -1
- package/src/plugins/nx-module-federation-plugin/rspack/nx-module-federation-dev-server-plugin.js +2 -1
- package/src/plugins/nx-module-federation-plugin/rspack/nx-module-federation-ssr-dev-server-plugin.js +2 -1
- package/src/utils/get-remotes-for-host.js +2 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/module-federation",
|
|
3
3
|
"description": "The Nx Plugin for Module Federation contains executors and utilities that support building applications using Module Federation.",
|
|
4
|
-
"version": "22.7.0-beta.
|
|
4
|
+
"version": "22.7.0-beta.2",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"@module-federation/enhanced": "^2.1.0",
|
|
28
28
|
"@module-federation/node": "^2.7.21",
|
|
29
29
|
"@module-federation/sdk": "^2.1.0",
|
|
30
|
-
"@nx/devkit": "22.7.0-beta.
|
|
31
|
-
"@nx/js": "22.7.0-beta.
|
|
32
|
-
"@nx/web": "22.7.0-beta.
|
|
30
|
+
"@nx/devkit": "22.7.0-beta.2",
|
|
31
|
+
"@nx/js": "22.7.0-beta.2",
|
|
32
|
+
"@nx/web": "22.7.0-beta.2",
|
|
33
33
|
"@rspack/core": "1.6.8",
|
|
34
34
|
"express": "^4.21.2",
|
|
35
35
|
"http-proxy-middleware": "^3.0.5",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"webpack": "^5.101.3"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"nx": "22.7.0-beta.
|
|
41
|
+
"nx": "22.7.0-beta.2"
|
|
42
42
|
},
|
|
43
43
|
"nx-migrations": {
|
|
44
44
|
"migrations": "./migrations.json"
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.startStaticRemotesFileServer = startStaticRemotesFileServer;
|
|
4
4
|
exports.startSsrStaticRemotesFileServer = startSsrStaticRemotesFileServer;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
5
6
|
const devkit_1 = require("@nx/devkit");
|
|
6
|
-
const file_server_impl_1 = require("@nx/web/src/executors/file-server/file-server.impl");
|
|
7
|
+
const file_server_impl_1 = tslib_1.__importDefault(require("@nx/web/src/executors/file-server/file-server.impl"));
|
|
7
8
|
const path_1 = require("path");
|
|
8
9
|
const fs_1 = require("fs");
|
|
9
10
|
function startStaticRemotesFileServer(staticRemotesConfig, context, options, forceMoveToCommonLocation = false) {
|
package/src/plugins/nx-module-federation-plugin/angular/nx-module-federation-dev-server-plugin.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NxModuleFederationDevServerPlugin = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const core_1 = require("@rspack/core");
|
|
5
|
-
const pc = require("picocolors");
|
|
6
|
+
const pc = tslib_1.__importStar(require("picocolors"));
|
|
6
7
|
const devkit_1 = require("@nx/devkit");
|
|
7
8
|
const path_1 = require("path");
|
|
8
9
|
const fs_1 = require("fs");
|
package/src/plugins/nx-module-federation-plugin/angular/nx-module-federation-plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nx-module-federation-plugin.d.ts","sourceRoot":"","sources":["../../../../../../../packages/module-federation/src/plugins/nx-module-federation-plugin/angular/nx-module-federation-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EACL,sBAAsB,EACtB,gCAAgC,EACjC,MAAM,uBAAuB,CAAC;AAI/B,qBAAa,wBAAyB,YAAW,oBAAoB;IAEjE,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,cAAc,CAAC;gBAJf,QAAQ,EAAE;QAChB,MAAM,EAAE,sBAAsB,CAAC;QAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB,EACO,cAAc,CAAC,EAAE,gCAAgC;IAG3D,KAAK,CAAC,QAAQ,EAAE,QAAQ;
|
|
1
|
+
{"version":3,"file":"nx-module-federation-plugin.d.ts","sourceRoot":"","sources":["../../../../../../../packages/module-federation/src/plugins/nx-module-federation-plugin/angular/nx-module-federation-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EACL,sBAAsB,EACtB,gCAAgC,EACjC,MAAM,uBAAuB,CAAC;AAI/B,qBAAa,wBAAyB,YAAW,oBAAoB;IAEjE,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,cAAc,CAAC;gBAJf,QAAQ,EAAE;QAChB,MAAM,EAAE,sBAAsB,CAAC;QAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB,EACO,cAAc,CAAC,EAAE,gCAAgC;IAG3D,KAAK,CAAC,QAAQ,EAAE,QAAQ;CAmFzB"}
|
|
@@ -34,6 +34,14 @@ class NxModuleFederationPlugin {
|
|
|
34
34
|
};
|
|
35
35
|
compiler.options.output.library.type = 'commonjs-module';
|
|
36
36
|
}
|
|
37
|
+
else {
|
|
38
|
+
// Ensure ESM output is enabled when using library type 'module'.
|
|
39
|
+
// Without these, remoteEntry.js emits `export` statements but the
|
|
40
|
+
// runtime loads it as a classic script, causing "Unexpected token 'export'".
|
|
41
|
+
compiler.options.experiments ??= {};
|
|
42
|
+
compiler.options.experiments.outputModule = true;
|
|
43
|
+
compiler.options.output.module = true;
|
|
44
|
+
}
|
|
37
45
|
const config = (0, utils_1.getModuleFederationConfigSync)(this._options.config, {
|
|
38
46
|
isServer: this._options.isServer,
|
|
39
47
|
}, true);
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NxModuleFederationSSRDevServerPlugin = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const core_1 = require("@rspack/core");
|
|
5
|
-
const pc = require("picocolors");
|
|
6
|
+
const pc = tslib_1.__importStar(require("picocolors"));
|
|
6
7
|
const devkit_1 = require("@nx/devkit");
|
|
7
8
|
const path_1 = require("path");
|
|
8
9
|
const fs_1 = require("fs");
|
package/src/plugins/nx-module-federation-plugin/rspack/nx-module-federation-dev-server-plugin.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NxModuleFederationDevServerPlugin = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const core_1 = require("@rspack/core");
|
|
5
|
-
const pc = require("picocolors");
|
|
6
|
+
const pc = tslib_1.__importStar(require("picocolors"));
|
|
6
7
|
const devkit_1 = require("@nx/devkit");
|
|
7
8
|
const path_1 = require("path");
|
|
8
9
|
const fs_1 = require("fs");
|
package/src/plugins/nx-module-federation-plugin/rspack/nx-module-federation-ssr-dev-server-plugin.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NxModuleFederationSSRDevServerPlugin = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const core_1 = require("@rspack/core");
|
|
5
|
-
const pc = require("picocolors");
|
|
6
|
+
const pc = tslib_1.__importStar(require("picocolors"));
|
|
6
7
|
const devkit_1 = require("@nx/devkit");
|
|
7
8
|
const path_1 = require("path");
|
|
8
9
|
const fs_1 = require("fs");
|
|
@@ -3,10 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getBuildTargetNameFromMFDevServer = getBuildTargetNameFromMFDevServer;
|
|
4
4
|
exports.getRemotes = getRemotes;
|
|
5
5
|
exports.getModuleFederationConfig = getModuleFederationConfig;
|
|
6
|
+
const tslib_1 = require("tslib");
|
|
6
7
|
const devkit_1 = require("@nx/devkit");
|
|
7
8
|
const internal_1 = require("@nx/js/src/internal");
|
|
8
9
|
const find_matching_projects_1 = require("nx/src/utils/find-matching-projects");
|
|
9
|
-
const pc = require("picocolors");
|
|
10
|
+
const pc = tslib_1.__importStar(require("picocolors"));
|
|
10
11
|
const path_1 = require("path");
|
|
11
12
|
const fs_1 = require("fs");
|
|
12
13
|
function extractRemoteProjectsFromConfig(config, pathToManifestFile) {
|