@nx/module-federation 23.0.0-beta.15 → 23.0.0-beta.17

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 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": "23.0.0-beta.15",
4
+ "version": "23.0.0-beta.17",
5
5
  "type": "commonjs",
6
6
  "repository": {
7
7
  "type": "git",
@@ -22,14 +22,87 @@
22
22
  "license": "MIT",
23
23
  "homepage": "https://nx.dev",
24
24
  "main": "index.js",
25
+ "types": "./index.d.ts",
26
+ "exports": {
27
+ ".": {
28
+ "types": "./index.d.ts",
29
+ "default": "./index.js"
30
+ },
31
+ "./package.json": "./package.json",
32
+ "./package": "./package.json",
33
+ "./executors.json": "./executors.json",
34
+ "./migrations.json": "./migrations.json",
35
+ "./executors": "./executors.json",
36
+ "./migrations": "./migrations.json",
37
+ "./angular": {
38
+ "types": "./angular.d.ts",
39
+ "default": "./angular.js"
40
+ },
41
+ "./angular.js": {
42
+ "types": "./angular.d.ts",
43
+ "default": "./angular.js"
44
+ },
45
+ "./rspack": {
46
+ "types": "./rspack.d.ts",
47
+ "default": "./rspack.js"
48
+ },
49
+ "./rspack.js": {
50
+ "types": "./rspack.d.ts",
51
+ "default": "./rspack.js"
52
+ },
53
+ "./webpack": {
54
+ "types": "./webpack.d.ts",
55
+ "default": "./webpack.js"
56
+ },
57
+ "./webpack.js": {
58
+ "types": "./webpack.d.ts",
59
+ "default": "./webpack.js"
60
+ },
61
+ "./url-helpers": {
62
+ "types": "./url-helpers.d.ts",
63
+ "default": "./url-helpers.js"
64
+ },
65
+ "./url-helpers.js": {
66
+ "types": "./url-helpers.d.ts",
67
+ "default": "./url-helpers.js"
68
+ },
69
+ "./src/utils": {
70
+ "types": "./src/utils/index.d.ts",
71
+ "default": "./src/utils/index.js"
72
+ },
73
+ "./src/utils/models": {
74
+ "types": "./src/utils/models/index.d.ts",
75
+ "default": "./src/utils/models/index.js"
76
+ },
77
+ "./src/executors/utils": {
78
+ "types": "./src/executors/utils/index.d.ts",
79
+ "default": "./src/executors/utils/index.js"
80
+ },
81
+ "./src/plugins/models": {
82
+ "types": "./src/plugins/models/index.d.ts",
83
+ "default": "./src/plugins/models/index.js"
84
+ },
85
+ "./src/plugins/utils": {
86
+ "types": "./src/plugins/utils/index.d.ts",
87
+ "default": "./src/plugins/utils/index.js"
88
+ },
89
+ "./src/*": {
90
+ "types": "./src/*.d.ts",
91
+ "default": "./src/*.js"
92
+ },
93
+ "./src/*.js": {
94
+ "types": "./src/*.d.ts",
95
+ "default": "./src/*.js"
96
+ }
97
+ },
25
98
  "executors": "./executors.json",
26
99
  "dependencies": {
27
100
  "@module-federation/enhanced": "^2.3.3",
28
101
  "@module-federation/node": "^2.7.21",
29
102
  "@module-federation/sdk": "^2.1.0",
30
- "@nx/devkit": "23.0.0-beta.15",
31
- "@nx/js": "23.0.0-beta.15",
32
- "@nx/web": "23.0.0-beta.15",
103
+ "@nx/devkit": "23.0.0-beta.17",
104
+ "@nx/js": "23.0.0-beta.17",
105
+ "@nx/web": "23.0.0-beta.17",
33
106
  "@rspack/core": "1.6.8",
34
107
  "express": "^4.21.2",
35
108
  "http-proxy-middleware": "^3.0.5",
@@ -38,7 +111,7 @@
38
111
  "webpack": "^5.101.3"
39
112
  },
40
113
  "devDependencies": {
41
- "nx": "23.0.0-beta.15"
114
+ "nx": "23.0.0-beta.17"
42
115
  },
43
116
  "nx-migrations": {
44
117
  "migrations": "./migrations.json"
@@ -1 +1 @@
1
- {"version":3,"file":"get-remotes-for-host.d.ts","sourceRoot":"","sources":["../../../../../packages/module-federation/src/utils/get-remotes-for-host.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,oBAAoB,EACzB,KAAK,YAAY,EAElB,MAAM,YAAY,CAAC;AAMpB,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAElD,UAAU,+BAA+B;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,YAAY,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;CACd;AAsCD,wBAAgB,iCAAiC,CAC/C,aAAa,EAAE,oBAAoB,EACnC,YAAY,EAAE,YAAY,UA0B3B;AAoCD,wBAAgB,UAAU,CACxB,UAAU,EAAE,MAAM,EAAE,EACpB,WAAW,EAAE,MAAM,EAAE,EACrB,MAAM,EAAE,sBAAsB,EAC9B,OAAO,EAAE,+BAA+B,EACxC,kBAAkB,CAAC,EAAE,MAAM;;;;;;EA0F5B;AAED,wBAAgB,yBAAyB,CACvC,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,UAAU,GAAE,OAAO,GAAG,SAAmB,OAkD1C"}
1
+ {"version":3,"file":"get-remotes-for-host.d.ts","sourceRoot":"","sources":["../../../../../packages/module-federation/src/utils/get-remotes-for-host.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,oBAAoB,EACzB,KAAK,YAAY,EAElB,MAAM,YAAY,CAAC;AAMpB,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAElD,UAAU,+BAA+B;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,YAAY,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;CACd;AAsCD,wBAAgB,iCAAiC,CAC/C,aAAa,EAAE,oBAAoB,EACnC,YAAY,EAAE,YAAY,UA0B3B;AAoCD,wBAAgB,UAAU,CACxB,UAAU,EAAE,MAAM,EAAE,EACpB,WAAW,EAAE,MAAM,EAAE,EACrB,MAAM,EAAE,sBAAsB,EAC9B,OAAO,EAAE,+BAA+B,EACxC,kBAAkB,CAAC,EAAE,MAAM;;;;;;EA0F5B;AAED,wBAAgB,yBAAyB,CACvC,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,UAAU,GAAE,OAAO,GAAG,SAAmB,OAiD1C"}
@@ -135,18 +135,17 @@ function getModuleFederationConfig(tsconfigPath, workspaceRoot, projectRoot, plu
135
135
  if (!tsconfigPath) {
136
136
  throw new Error(`Could not find a tsconfig for remote project located at ${projectRoot}. Please add a tsconfig.app.json or tsconfig.json to the project.`);
137
137
  }
138
- // create a no-op so this can be called with issue
139
138
  const fullTSconfigPath = tsconfigPath.startsWith(workspaceRoot)
140
139
  ? tsconfigPath
141
140
  : (0, path_1.join)(workspaceRoot, tsconfigPath);
142
- let cleanupTranspiler = () => { };
143
- if ((0, fs_1.existsSync)(moduleFederationConfigPathTS)) {
144
- cleanupTranspiler = (0, internal_1.registerTsProject)(fullTSconfigPath);
141
+ const isTsConfig = (0, fs_1.existsSync)(moduleFederationConfigPathTS);
142
+ if (isTsConfig) {
145
143
  moduleFederationConfigPath = moduleFederationConfigPathTS;
146
144
  }
147
145
  try {
148
- const config = require(moduleFederationConfigPath);
149
- cleanupTranspiler();
146
+ const config = isTsConfig
147
+ ? (0, internal_1.loadTsFile)(moduleFederationConfigPath, fullTSconfigPath)
148
+ : require(moduleFederationConfigPath);
150
149
  return config.default || config;
151
150
  }
152
151
  catch {