@nx/react 21.2.0-canary.20250524-e2b3aca → 21.2.0-canary.20250527-4a94841

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.
@@ -4,6 +4,7 @@ exports.setRemoteUrlResolver = setRemoteUrlResolver;
4
4
  exports.setRemoteDefinitions = setRemoteDefinitions;
5
5
  exports.setRemoteDefinition = setRemoteDefinition;
6
6
  exports.loadRemoteModule = loadRemoteModule;
7
+ const node_path_1 = require("node:path");
7
8
  let remoteUrlDefinitions = {};
8
9
  let resolveRemoteUrl;
9
10
  const remoteModuleMap = new Map();
@@ -131,10 +132,15 @@ async function loadRemoteContainer(remoteName) {
131
132
  const remoteUrl = remoteUrlDefinitions
132
133
  ? remoteUrlDefinitions[remoteName]
133
134
  : await resolveRemoteUrl(remoteName);
134
- let containerUrl = remoteUrl;
135
- if (!remoteUrl.endsWith('.mjs') && !remoteUrl.endsWith('.js')) {
136
- containerUrl = `${remoteUrl}${remoteUrl.endsWith('/') ? '' : '/'}remoteEntry.js`;
135
+ const url = new URL(remoteUrl);
136
+ const ext = (0, node_path_1.extname)(url.pathname);
137
+ const needsRemoteEntry = !['.js', '.mjs', '.json'].includes(ext);
138
+ if (needsRemoteEntry) {
139
+ url.pathname = url.pathname.endsWith('/')
140
+ ? `${url.pathname}remoteEntry.mjs`
141
+ : `${url.pathname}/remoteEntry.mjs`;
137
142
  }
143
+ const containerUrl = url.href;
138
144
  const container = await fetchRemoteModule(containerUrl, remoteName);
139
145
  await container.init(__webpack_share_scopes__.default);
140
146
  remoteContainerMap.set(remoteName, container);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/react",
3
- "version": "21.2.0-canary.20250524-e2b3aca",
3
+ "version": "21.2.0-canary.20250527-4a94841",
4
4
  "private": false,
5
5
  "description": "The React plugin for Nx contains executors and generators for managing React applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Vitest, Playwright, Cypress, and Storybook.\n\n- Generators for applications, libraries, components, hooks, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
6
6
  "repository": {
@@ -38,11 +38,11 @@
38
38
  "minimatch": "9.0.3",
39
39
  "picocolors": "^1.1.0",
40
40
  "tslib": "^2.3.0",
41
- "@nx/devkit": "21.2.0-canary.20250524-e2b3aca",
42
- "@nx/js": "21.2.0-canary.20250524-e2b3aca",
43
- "@nx/eslint": "21.2.0-canary.20250524-e2b3aca",
44
- "@nx/web": "21.2.0-canary.20250524-e2b3aca",
45
- "@nx/module-federation": "21.2.0-canary.20250524-e2b3aca",
41
+ "@nx/devkit": "21.2.0-canary.20250527-4a94841",
42
+ "@nx/js": "21.2.0-canary.20250527-4a94841",
43
+ "@nx/eslint": "21.2.0-canary.20250527-4a94841",
44
+ "@nx/web": "21.2.0-canary.20250527-4a94841",
45
+ "@nx/module-federation": "21.2.0-canary.20250527-4a94841",
46
46
  "express": "^4.21.2",
47
47
  "http-proxy-middleware": "^3.0.3",
48
48
  "semver": "^7.6.3"
@@ -187,6 +187,7 @@ async function libraryGeneratorInternal(host, schema) {
187
187
  export: true,
188
188
  routing: options.routing,
189
189
  js: options.js,
190
+ name: options.name,
190
191
  inSourceTests: options.inSourceTests,
191
192
  skipFormat: true,
192
193
  globalCss: options.globalCss,