@nx/react 21.1.1 → 21.1.3
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/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
<p style="text-align: center;">
|
2
2
|
<picture>
|
3
3
|
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-dark.svg">
|
4
|
-
<img alt="Nx - Smart
|
4
|
+
<img alt="Nx - Smart Repos · Fast Builds" src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-light.svg" width="100%">
|
5
5
|
</picture>
|
6
6
|
</p>
|
7
7
|
|
@@ -20,9 +20,9 @@
|
|
20
20
|
|
21
21
|
<hr>
|
22
22
|
|
23
|
-
# Nx: Smart
|
23
|
+
# Nx: Smart Repos · Fast Builds
|
24
24
|
|
25
|
-
|
25
|
+
An AI-first build platform that connects everything from your editor to CI. Helping you deliver fast, without breaking things.
|
26
26
|
|
27
27
|
This package is a [React plugin for Nx](https://nx.dev/nx-api/react).
|
28
28
|
|
@@ -64,5 +64,5 @@ npx nx@latest init
|
|
64
64
|
- [Blog Posts About Nx](https://nx.dev/blog)
|
65
65
|
|
66
66
|
<p style="text-align: center;"><a href="https://nx.dev/#learning-materials" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-courses-and-videos.svg"
|
67
|
-
width="100%" alt="Nx - Smart
|
67
|
+
width="100%" alt="Nx - Smart Repos · Fast Builds"></a></p>
|
68
68
|
|
package/mf/dynamic-federation.js
CHANGED
@@ -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
|
-
|
135
|
-
|
136
|
-
|
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.1.
|
3
|
+
"version": "21.1.3",
|
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.1.
|
42
|
-
"@nx/js": "21.1.
|
43
|
-
"@nx/eslint": "21.1.
|
44
|
-
"@nx/web": "21.1.
|
45
|
-
"@nx/module-federation": "21.1.
|
41
|
+
"@nx/devkit": "21.1.3",
|
42
|
+
"@nx/js": "21.1.3",
|
43
|
+
"@nx/eslint": "21.1.3",
|
44
|
+
"@nx/web": "21.1.3",
|
45
|
+
"@nx/module-federation": "21.1.3",
|
46
46
|
"express": "^4.21.2",
|
47
47
|
"http-proxy-middleware": "^3.0.3",
|
48
48
|
"semver": "^7.6.3"
|
@@ -32,6 +32,7 @@ async function installCommonDependencies(host, options) {
|
|
32
32
|
}
|
33
33
|
if (options.unitTestRunner && options.unitTestRunner !== 'none') {
|
34
34
|
devDependencies['@testing-library/react'] = versions_1.testingLibraryReactVersion;
|
35
|
+
devDependencies['@testing-library/dom'] = versions_1.testingLibraryDomVersion;
|
35
36
|
}
|
36
37
|
const baseInstallTask = (0, devkit_1.addDependenciesToPackageJson)(host, dependencies, devDependencies);
|
37
38
|
tasks.push(baseInstallTask);
|