@nx/react 24.0.0-beta.1 → 24.0.0-beta.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/dist/index.d.ts +0 -2
- package/dist/index.js +1 -5
- package/dist/internal.d.ts +1 -0
- package/dist/internal.js +3 -1
- package/dist/plugins/component-testing/index.js +92 -33
- package/dist/plugins/storybook/index.js +18 -18
- package/dist/plugins/with-react.d.ts +3 -7
- package/dist/plugins/with-react.js +5 -19
- package/dist/src/generators/application/application.js +1 -36
- package/dist/src/generators/application/files/base-rspack/rspack.config.js__tmpl__ +1 -24
- package/dist/src/generators/application/files/base-webpack/webpack.config.js__tmpl__ +1 -26
- package/dist/src/generators/application/lib/add-e2e.js +5 -6
- package/dist/src/generators/application/lib/add-linting.js +0 -1
- package/dist/src/generators/application/lib/add-project.js +0 -167
- package/dist/src/generators/application/lib/bundlers/add-rsbuild.js +0 -1
- package/dist/src/generators/application/lib/bundlers/add-vite.js +0 -2
- package/dist/src/generators/application/lib/bundlers/add-webpack.js +0 -1
- package/dist/src/generators/application/lib/create-application-files.d.ts +0 -1
- package/dist/src/generators/application/lib/create-application-files.js +2 -11
- package/dist/src/generators/application/lib/normalize-options.js +0 -4
- package/dist/src/generators/application/schema.d.ts +0 -2
- package/dist/src/generators/cypress-component-configuration/cypress-component-configuration.js +1 -9
- package/dist/src/generators/cypress-component-configuration/schema.d.ts +0 -1
- package/dist/src/generators/init/init.js +3 -5
- package/dist/src/generators/init/schema.d.ts +0 -1
- package/dist/src/generators/library/lib/add-linting.js +0 -1
- package/dist/src/generators/library/lib/add-rollup-build-target.js +3 -47
- package/dist/src/generators/library/lib/normalize-options.js +0 -4
- package/dist/src/generators/library/library.js +1 -4
- package/dist/src/generators/library/schema.d.ts +0 -1
- package/dist/src/generators/storybook-configuration/configuration.js +1 -9
- package/dist/src/generators/storybook-configuration/schema.d.ts +0 -1
- package/dist/src/migrations/update-23-2-0/add-optional-module-federation-packages.js +2 -1
- package/dist/src/migrations/update-24-0-0/register-typescript-plugin-for-typecheck.d.ts +4 -0
- package/dist/src/migrations/update-24-0-0/register-typescript-plugin-for-typecheck.js +13 -0
- package/dist/src/migrations/update-24-0-0/register-typescript-plugin-for-typecheck.md +40 -0
- package/dist/src/plugins/router-plugin.d.ts +0 -1
- package/dist/src/plugins/router-plugin.js +5 -42
- package/dist/src/utils/ast-utils.d.ts +0 -1
- package/dist/src/utils/ast-utils.js +0 -23
- package/dist/src/utils/ct-utils.js +54 -14
- package/dist/src/utils/deprecation.d.ts +1 -1
- package/dist/src/utils/deprecation.js +3 -5
- package/dist/src/utils/versions.d.ts +0 -7
- package/dist/src/utils/versions.js +2 -9
- package/executors.json +1 -17
- package/generators.json +0 -27
- package/migrations.json +6 -0
- package/package.json +17 -47
- package/dist/mf/dynamic-federation.d.ts +0 -69
- package/dist/mf/dynamic-federation.js +0 -141
- package/dist/mf/index.d.ts +0 -1
- package/dist/mf/index.js +0 -8
- package/dist/module-federation.d.ts +0 -5
- package/dist/module-federation.js +0 -20
- package/dist/src/executors/module-federation-dev-server/lib/index.d.ts +0 -2
- package/dist/src/executors/module-federation-dev-server/lib/index.js +0 -5
- package/dist/src/executors/module-federation-dev-server/lib/normalize-options.d.ts +0 -4
- package/dist/src/executors/module-federation-dev-server/lib/normalize-options.js +0 -19
- package/dist/src/executors/module-federation-dev-server/lib/start-remotes.d.ts +0 -5
- package/dist/src/executors/module-federation-dev-server/lib/start-remotes.js +0 -33
- package/dist/src/executors/module-federation-dev-server/module-federation-dev-server.impl.d.ts +0 -6
- package/dist/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js +0 -80
- package/dist/src/executors/module-federation-dev-server/schema.d.ts +0 -19
- package/dist/src/executors/module-federation-dev-server/schema.json +0 -142
- package/dist/src/executors/module-federation-ssr-dev-server/lib/index.d.ts +0 -2
- package/dist/src/executors/module-federation-ssr-dev-server/lib/index.js +0 -5
- package/dist/src/executors/module-federation-ssr-dev-server/lib/normalize-options.d.ts +0 -4
- package/dist/src/executors/module-federation-ssr-dev-server/lib/normalize-options.js +0 -23
- package/dist/src/executors/module-federation-ssr-dev-server/lib/start-remotes.d.ts +0 -5
- package/dist/src/executors/module-federation-ssr-dev-server/lib/start-remotes.js +0 -34
- package/dist/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.d.ts +0 -3
- package/dist/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js +0 -83
- package/dist/src/executors/module-federation-ssr-dev-server/schema.d.ts +0 -29
- package/dist/src/executors/module-federation-ssr-dev-server/schema.json +0 -81
- package/dist/src/executors/module-federation-static-server/module-federation-static-server.impl.d.ts +0 -12
- package/dist/src/executors/module-federation-static-server/module-federation-static-server.impl.js +0 -244
- package/dist/src/executors/module-federation-static-server/schema.d.ts +0 -3
- package/dist/src/executors/module-federation-static-server/schema.json +0 -16
- package/dist/src/generators/federate-module/federate-module.d.ts +0 -4
- package/dist/src/generators/federate-module/federate-module.js +0 -67
- package/dist/src/generators/federate-module/lib/utils.d.ts +0 -23
- package/dist/src/generators/federate-module/lib/utils.js +0 -99
- package/dist/src/generators/federate-module/schema.d.ts +0 -15
- package/dist/src/generators/federate-module/schema.json +0 -89
- package/dist/src/generators/host/files/common/src/app/__fileName__.js__tmpl__ +0 -40
- package/dist/src/generators/host/files/common/src/main.js__tmpl__ +0 -13
- package/dist/src/generators/host/files/common/tsconfig.lint.json__tmpl__ +0 -19
- package/dist/src/generators/host/files/common-ts/src/app/__fileName__.tsx__tmpl__ +0 -41
- package/dist/src/generators/host/files/common-ts/src/main.ts__tmpl__ +0 -13
- package/dist/src/generators/host/files/rspack-common/src/app/__fileName__.jsx__tmpl__ +0 -42
- package/dist/src/generators/host/files/rspack-common/src/main.jsx__tmpl__ +0 -13
- package/dist/src/generators/host/files/rspack-common/tsconfig.lint.json__tmpl__ +0 -19
- package/dist/src/generators/host/files/rspack-module-federation/module-federation.config.js__tmpl__ +0 -24
- package/dist/src/generators/host/files/rspack-module-federation/rspack.config.js__tmpl__ +0 -42
- package/dist/src/generators/host/files/rspack-module-federation/rspack.config.prod.js__tmpl__ +0 -66
- package/dist/src/generators/host/files/rspack-module-federation-ssr/module-federation.server.config.js__tmpl__ +0 -27
- package/dist/src/generators/host/files/rspack-module-federation-ssr/rspack.config.js__tmpl__ +0 -68
- package/dist/src/generators/host/files/rspack-module-federation-ssr/server.ts__tmpl__ +0 -28
- package/dist/src/generators/host/files/rspack-module-federation-ssr/src/main.server.tsx__tmpl__ +0 -49
- package/dist/src/generators/host/files/rspack-module-federation-ssr/tsconfig.server.json__tmpl__ +0 -17
- package/dist/src/generators/host/files/rspack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +0 -22
- package/dist/src/generators/host/files/rspack-module-federation-ssr-ts/rspack.config.ts__tmpl__ +0 -68
- package/dist/src/generators/host/files/rspack-module-federation-ssr-ts/server.ts__tmpl__ +0 -28
- package/dist/src/generators/host/files/rspack-module-federation-ssr-ts/src/main.server.tsx__tmpl__ +0 -49
- package/dist/src/generators/host/files/rspack-module-federation-ssr-ts/tsconfig.server.json__tmpl__ +0 -17
- package/dist/src/generators/host/files/rspack-module-federation-ts/module-federation.config.ts__tmpl__ +0 -28
- package/dist/src/generators/host/files/rspack-module-federation-ts/rspack.config.prod.ts__tmpl__ +0 -67
- package/dist/src/generators/host/files/rspack-module-federation-ts/rspack.config.ts__tmpl__ +0 -42
- package/dist/src/generators/host/files/webpack-module-federation/module-federation.config.js__tmpl__ +0 -24
- package/dist/src/generators/host/files/webpack-module-federation/webpack.config.js__tmpl__ +0 -17
- package/dist/src/generators/host/files/webpack-module-federation/webpack.config.prod.js__tmpl__ +0 -39
- package/dist/src/generators/host/files/webpack-module-federation-ssr/module-federation.server.config.js__tmpl__ +0 -19
- package/dist/src/generators/host/files/webpack-module-federation-ssr/server.ts__tmpl__ +0 -28
- package/dist/src/generators/host/files/webpack-module-federation-ssr/tsconfig.server.json__tmpl__ +0 -17
- package/dist/src/generators/host/files/webpack-module-federation-ssr/webpack.server.config.js__tmpl__ +0 -17
- package/dist/src/generators/host/files/webpack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +0 -16
- package/dist/src/generators/host/files/webpack-module-federation-ssr-ts/server.ts__tmpl__ +0 -28
- package/dist/src/generators/host/files/webpack-module-federation-ssr-ts/tsconfig.server.json__tmpl__ +0 -17
- package/dist/src/generators/host/files/webpack-module-federation-ssr-ts/webpack.server.config.ts__tmpl__ +0 -17
- package/dist/src/generators/host/files/webpack-module-federation-ts/module-federation.config.ts__tmpl__ +0 -28
- package/dist/src/generators/host/files/webpack-module-federation-ts/webpack.config.prod.ts__tmpl__ +0 -40
- package/dist/src/generators/host/files/webpack-module-federation-ts/webpack.config.ts__tmpl__ +0 -18
- package/dist/src/generators/host/host.d.ts +0 -4
- package/dist/src/generators/host/host.js +0 -174
- package/dist/src/generators/host/lib/add-module-federation-files.d.ts +0 -6
- package/dist/src/generators/host/lib/add-module-federation-files.js +0 -92
- package/dist/src/generators/host/lib/normalize-host-name.d.ts +0 -2
- package/dist/src/generators/host/lib/normalize-host-name.js +0 -12
- package/dist/src/generators/host/lib/setup-ssr-for-host.d.ts +0 -6
- package/dist/src/generators/host/lib/setup-ssr-for-host.js +0 -59
- package/dist/src/generators/host/lib/update-module-federation-e2e-project.d.ts +0 -3
- package/dist/src/generators/host/lib/update-module-federation-e2e-project.js +0 -19
- package/dist/src/generators/host/lib/update-module-federation-tsconfig.d.ts +0 -3
- package/dist/src/generators/host/lib/update-module-federation-tsconfig.js +0 -34
- package/dist/src/generators/host/schema.d.ts +0 -44
- package/dist/src/generators/host/schema.json +0 -173
- package/dist/src/generators/remote/files/common/src/main.js__tmpl__ +0 -1
- package/dist/src/generators/remote/files/common/src/remote-entry.js__tmpl__ +0 -1
- package/dist/src/generators/remote/files/common-ts/src/main.ts__tmpl__ +0 -1
- package/dist/src/generators/remote/files/common-ts/src/remote-entry.ts__tmpl__ +0 -1
- package/dist/src/generators/remote/files/rspack-common/src/main.jsx__tmpl__ +0 -1
- package/dist/src/generators/remote/files/rspack-common/src/remote-entry.js__tmpl__ +0 -1
- package/dist/src/generators/remote/files/rspack-module-federation/module-federation.config.js__tmpl__ +0 -12
- package/dist/src/generators/remote/files/rspack-module-federation/rspack.config.js__tmpl__ +0 -45
- package/dist/src/generators/remote/files/rspack-module-federation/rspack.config.prod.js__tmpl__ +0 -1
- package/dist/src/generators/remote/files/rspack-module-federation-ssr/module-federation.server.config.js__tmpl__ +0 -15
- package/dist/src/generators/remote/files/rspack-module-federation-ssr/rspack.config.js__tmpl__ +0 -71
- package/dist/src/generators/remote/files/rspack-module-federation-ssr/server.ts__tmpl__ +0 -45
- package/dist/src/generators/remote/files/rspack-module-federation-ssr/src/main.server.tsx__tmpl__ +0 -45
- package/dist/src/generators/remote/files/rspack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +0 -19
- package/dist/src/generators/remote/files/rspack-module-federation-ssr-ts/rspack.config.ts__tmpl__ +0 -71
- package/dist/src/generators/remote/files/rspack-module-federation-ssr-ts/server.ts__tmpl__ +0 -45
- package/dist/src/generators/remote/files/rspack-module-federation-ssr-ts/src/main.server.tsx__tmpl__ +0 -45
- package/dist/src/generators/remote/files/rspack-module-federation-ssr-ts/tsconfig.lint.json__tmpl__ +0 -19
- package/dist/src/generators/remote/files/rspack-module-federation-ts/module-federation.config.ts__tmpl__ +0 -16
- package/dist/src/generators/remote/files/rspack-module-federation-ts/rspack.config.prod.ts__tmpl__ +0 -1
- package/dist/src/generators/remote/files/rspack-module-federation-ts/rspack.config.ts__tmpl__ +0 -45
- package/dist/src/generators/remote/files/rspack-module-federation-ts/tsconfig.lint.json__tmpl__ +0 -19
- package/dist/src/generators/remote/files/webpack-module-federation/module-federation.config.js__tmpl__ +0 -12
- package/dist/src/generators/remote/files/webpack-module-federation/webpack.config.js__tmpl__ +0 -17
- package/dist/src/generators/remote/files/webpack-module-federation/webpack.config.prod.js__tmpl__ +0 -1
- package/dist/src/generators/remote/files/webpack-module-federation-ssr/module-federation.server.config.js__tmpl__ +0 -9
- package/dist/src/generators/remote/files/webpack-module-federation-ssr/server.ts__tmpl__ +0 -45
- package/dist/src/generators/remote/files/webpack-module-federation-ssr/webpack.server.config.js__tmpl__ +0 -17
- package/dist/src/generators/remote/files/webpack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +0 -13
- package/dist/src/generators/remote/files/webpack-module-federation-ssr-ts/server.ts__tmpl__ +0 -45
- package/dist/src/generators/remote/files/webpack-module-federation-ssr-ts/tsconfig.lint.json__tmpl__ +0 -19
- package/dist/src/generators/remote/files/webpack-module-federation-ssr-ts/webpack.server.config.ts__tmpl__ +0 -17
- package/dist/src/generators/remote/files/webpack-module-federation-ts/module-federation.config.ts__tmpl__ +0 -16
- package/dist/src/generators/remote/files/webpack-module-federation-ts/tsconfig.lint.json__tmpl__ +0 -19
- package/dist/src/generators/remote/files/webpack-module-federation-ts/webpack.config.prod.ts__tmpl__ +0 -1
- package/dist/src/generators/remote/files/webpack-module-federation-ts/webpack.config.ts__tmpl__ +0 -17
- package/dist/src/generators/remote/lib/add-remote-to-dynamic-host.d.ts +0 -2
- package/dist/src/generators/remote/lib/add-remote-to-dynamic-host.js +0 -12
- package/dist/src/generators/remote/lib/setup-package-json-exports-for-remote.d.ts +0 -3
- package/dist/src/generators/remote/lib/setup-package-json-exports-for-remote.js +0 -30
- package/dist/src/generators/remote/lib/setup-ssr-for-remote.d.ts +0 -4
- package/dist/src/generators/remote/lib/setup-ssr-for-remote.js +0 -61
- package/dist/src/generators/remote/lib/setup-tspath-for-remote.d.ts +0 -3
- package/dist/src/generators/remote/lib/setup-tspath-for-remote.js +0 -14
- package/dist/src/generators/remote/lib/update-host-with-remote.d.ts +0 -2
- package/dist/src/generators/remote/lib/update-host-with-remote.js +0 -79
- package/dist/src/generators/remote/remote.d.ts +0 -6
- package/dist/src/generators/remote/remote.js +0 -201
- package/dist/src/generators/remote/schema.d.ts +0 -39
- package/dist/src/generators/remote/schema.json +0 -173
- package/dist/src/generators/setup-ssr/files/server.ts__tmpl__ +0 -28
- package/dist/src/generators/setup-ssr/files/src/main.server.tsx__tmpl__ +0 -47
- package/dist/src/generators/setup-ssr/files/tsconfig.server.json__tmpl__ +0 -17
- package/dist/src/generators/setup-ssr/schema.d.ts +0 -8
- package/dist/src/generators/setup-ssr/schema.json +0 -54
- package/dist/src/generators/setup-ssr/setup-ssr.d.ts +0 -4
- package/dist/src/generators/setup-ssr/setup-ssr.js +0 -198
- package/dist/src/module-federation/ast-utils.d.ts +0 -8
- package/dist/src/module-federation/ast-utils.js +0 -101
- package/dist/src/rules/update-module-federation-project.d.ts +0 -11
- package/dist/src/rules/update-module-federation-project.js +0 -72
- package/dist/src/utils/add-mf-env-to-inputs.d.ts +0 -2
- package/dist/src/utils/add-mf-env-to-inputs.js +0 -29
- package/dist/src/utils/module-federation-deprecation.d.ts +0 -12
- package/dist/src/utils/module-federation-deprecation.js +0 -46
- package/dist/src/utils/normalize-remote.d.ts +0 -8
- package/dist/src/utils/normalize-remote.js +0 -31
|
@@ -7,7 +7,6 @@ const path_1 = require("path");
|
|
|
7
7
|
const fs_1 = require("fs");
|
|
8
8
|
const js_1 = require("@nx/js");
|
|
9
9
|
const internal_2 = require("@nx/js/internal");
|
|
10
|
-
const pmCommand = (0, devkit_1.getPackageManagerCommand)();
|
|
11
10
|
const reactRouterConfigBlob = '**/react-router.config.{ts,js,cjs,cts,mjs,mts}';
|
|
12
11
|
exports.createNodes = [
|
|
13
12
|
reactRouterConfigBlob,
|
|
@@ -28,15 +27,16 @@ exports.createNodes = [
|
|
|
28
27
|
roots: [],
|
|
29
28
|
configFiles: [],
|
|
30
29
|
});
|
|
31
|
-
const
|
|
30
|
+
const packageManager = (0, devkit_1.detectPackageManager)(context.workspaceRoot);
|
|
31
|
+
const pmCommand = (0, devkit_1.getPackageManagerCommand)(packageManager);
|
|
32
|
+
const lockfile = (0, js_1.getLockFileName)(packageManager);
|
|
32
33
|
const hashes = await (0, internal_1.calculateHashesForCreateNodes)(projectRoots, { ...normalizedOptions, isUsingTsSolutionSetup }, context, projectRoots.map((_) => [lockfile]));
|
|
33
34
|
try {
|
|
34
35
|
return await (0, devkit_1.createNodesFromFiles)(async (configFile, _, context, idx) => {
|
|
35
36
|
const projectRoot = (0, path_1.dirname)(configFile);
|
|
36
|
-
const siblingFiles = (0, fs_1.readdirSync)((0, devkit_1.joinPathFragments)(context.workspaceRoot, projectRoot));
|
|
37
37
|
const hash = hashes[idx] + configFile;
|
|
38
38
|
if (!targetsCache.has(hash)) {
|
|
39
|
-
targetsCache.set(hash, await buildReactRouterTargets(configFile, projectRoot, normalizedOptions, context,
|
|
39
|
+
targetsCache.set(hash, await buildReactRouterTargets(configFile, projectRoot, normalizedOptions, context, isUsingTsSolutionSetup, pmCommand));
|
|
40
40
|
}
|
|
41
41
|
const { projectType, metadata, targets } = targetsCache.get(hash);
|
|
42
42
|
const project = {
|
|
@@ -63,7 +63,7 @@ exports.createNodes = [
|
|
|
63
63
|
* @deprecated Use {@link createNodes} instead. This will be removed in Nx 24.
|
|
64
64
|
*/
|
|
65
65
|
exports.createNodesV2 = exports.createNodes;
|
|
66
|
-
async function buildReactRouterTargets(configFilePath, projectRoot, options, context,
|
|
66
|
+
async function buildReactRouterTargets(configFilePath, projectRoot, options, context, isUsingTsSolutionSetup, pmCommand) {
|
|
67
67
|
const namedInputs = (0, internal_1.getNamedInputs)(projectRoot, context);
|
|
68
68
|
const configPath = (0, path_1.join)(context.workspaceRoot, configFilePath);
|
|
69
69
|
if (require.cache[configPath])
|
|
@@ -77,7 +77,6 @@ async function buildReactRouterTargets(configFilePath, projectRoot, options, con
|
|
|
77
77
|
if (serverBuildPath) {
|
|
78
78
|
targets[options.startTargetName] = await startTarget(projectRoot, serverBuildPath, options.buildTargetName, namedInputs, isUsingTsSolutionSetup);
|
|
79
79
|
}
|
|
80
|
-
targets[options.typecheckTargetName] = await typecheckTarget(projectRoot, options.typecheckTargetName, namedInputs, siblingFiles, isUsingTsSolutionSetup);
|
|
81
80
|
(0, internal_2.addBuildAndWatchDepsTargets)(context.workspaceRoot, projectRoot, targets, options, pmCommand);
|
|
82
81
|
const metadata = {};
|
|
83
82
|
return {
|
|
@@ -157,47 +156,11 @@ async function startTarget(projectRoot, serverBuildPath, buildTargetName, namedI
|
|
|
157
156
|
}
|
|
158
157
|
return startTarget;
|
|
159
158
|
}
|
|
160
|
-
async function typecheckTarget(projectRoot, typecheckTargetName, namedInputs, siblingFiles, isUsingTsSolutionSetup) {
|
|
161
|
-
const hasTsConfigAppJson = siblingFiles.includes('tsconfig.app.json');
|
|
162
|
-
const typecheckTarget = {
|
|
163
|
-
cache: true,
|
|
164
|
-
inputs: [
|
|
165
|
-
...('production' in namedInputs
|
|
166
|
-
? ['production', '^production']
|
|
167
|
-
: ['default', '^default']),
|
|
168
|
-
{ externalDependencies: ['typescript'] },
|
|
169
|
-
],
|
|
170
|
-
command: isUsingTsSolutionSetup
|
|
171
|
-
? `tsc --build --emitDeclarationOnly`
|
|
172
|
-
: `tsc${hasTsConfigAppJson ? ` -p tsconfig.app.json` : ``} --noEmit`,
|
|
173
|
-
options: {
|
|
174
|
-
cwd: projectRoot,
|
|
175
|
-
},
|
|
176
|
-
metadata: {
|
|
177
|
-
description: `Runs type-checking for the project.`,
|
|
178
|
-
technologies: ['typescript'],
|
|
179
|
-
help: {
|
|
180
|
-
command: isUsingTsSolutionSetup
|
|
181
|
-
? `${pmCommand.exec} tsc --build --help`
|
|
182
|
-
: `${pmCommand.exec} tsc${hasTsConfigAppJson ? ` -p tsconfig.app.json` : ``} --help`,
|
|
183
|
-
example: isUsingTsSolutionSetup
|
|
184
|
-
? { args: ['--force'] }
|
|
185
|
-
: { options: { noEmit: true } },
|
|
186
|
-
},
|
|
187
|
-
},
|
|
188
|
-
};
|
|
189
|
-
if (isUsingTsSolutionSetup) {
|
|
190
|
-
typecheckTarget.dependsOn = [`^${typecheckTargetName}`];
|
|
191
|
-
typecheckTarget.syncGenerators = ['@nx/js:typescript-sync'];
|
|
192
|
-
}
|
|
193
|
-
return typecheckTarget;
|
|
194
|
-
}
|
|
195
159
|
function normalizeOptions(options) {
|
|
196
160
|
options ??= {};
|
|
197
161
|
options.buildTargetName ??= 'build';
|
|
198
162
|
options.devTargetName ??= 'dev';
|
|
199
163
|
options.startTargetName ??= 'start';
|
|
200
|
-
options.typecheckTargetName ??= 'typecheck';
|
|
201
164
|
return options;
|
|
202
165
|
}
|
|
203
166
|
function checkIfConfigFileShouldBeProject(projectRoot, context) {
|
|
@@ -18,7 +18,6 @@ export declare function addRoute(sourcePath: string, source: ts.SourceFile, opti
|
|
|
18
18
|
moduleName: string;
|
|
19
19
|
}): StringChange[];
|
|
20
20
|
export declare function addBrowserRouter(sourcePath: string, source: ts.SourceFile): StringChange[];
|
|
21
|
-
export declare function addStaticRouter(sourcePath: string, source: ts.SourceFile): StringChange[];
|
|
22
21
|
export declare function addReduxStoreToMain(sourcePath: string, source: ts.SourceFile): StringChange[];
|
|
23
22
|
export declare function updateReduxStore(sourcePath: string, source: ts.SourceFile, feature: {
|
|
24
23
|
keyName: string;
|
|
@@ -14,7 +14,6 @@ exports.isTag = isTag;
|
|
|
14
14
|
exports.addInitialRoutes = addInitialRoutes;
|
|
15
15
|
exports.addRoute = addRoute;
|
|
16
16
|
exports.addBrowserRouter = addBrowserRouter;
|
|
17
|
-
exports.addStaticRouter = addStaticRouter;
|
|
18
17
|
exports.addReduxStoreToMain = addReduxStoreToMain;
|
|
19
18
|
exports.updateReduxStore = updateReduxStore;
|
|
20
19
|
exports.getComponentNode = getComponentNode;
|
|
@@ -344,28 +343,6 @@ function addBrowserRouter(sourcePath, source) {
|
|
|
344
343
|
return [];
|
|
345
344
|
}
|
|
346
345
|
}
|
|
347
|
-
function addStaticRouter(sourcePath, source) {
|
|
348
|
-
const app = findElements(source, 'App')[0];
|
|
349
|
-
if (app) {
|
|
350
|
-
return [
|
|
351
|
-
...addImport(source, `import { StaticRouter } from 'react-router-dom/server';`),
|
|
352
|
-
{
|
|
353
|
-
type: devkit_1.ChangeType.Insert,
|
|
354
|
-
index: app.getStart(),
|
|
355
|
-
text: `<StaticRouter location={req.originalUrl}>`,
|
|
356
|
-
},
|
|
357
|
-
{
|
|
358
|
-
type: devkit_1.ChangeType.Insert,
|
|
359
|
-
index: app.getEnd(),
|
|
360
|
-
text: `</StaticRouter>`,
|
|
361
|
-
},
|
|
362
|
-
];
|
|
363
|
-
}
|
|
364
|
-
else {
|
|
365
|
-
devkit_1.logger.warn(`Could not find App component in ${sourcePath}; Skipping add <StaticRouter>`);
|
|
366
|
-
return [];
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
346
|
function addReduxStoreToMain(sourcePath, source) {
|
|
370
347
|
const renderStmt = findMainRenderStatement(source);
|
|
371
348
|
if (!renderStmt) {
|
|
@@ -6,7 +6,8 @@ exports.getBundlerFromTarget = getBundlerFromTarget;
|
|
|
6
6
|
exports.getActualBundler = getActualBundler;
|
|
7
7
|
exports.isComponent = isComponent;
|
|
8
8
|
const devkit_1 = require("@nx/devkit");
|
|
9
|
-
const internal_1 = require("@nx/
|
|
9
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
10
|
+
const internal_2 = require("@nx/js/internal");
|
|
10
11
|
const ast_utils_1 = require("./ast-utils");
|
|
11
12
|
let tsModule;
|
|
12
13
|
const allowedFileExt = new RegExp(/\.[jt]sx?/);
|
|
@@ -14,6 +15,28 @@ const isSpecFile = new RegExp(/(spec|test)\./);
|
|
|
14
15
|
// Resolved before the shared cypress generator runs, so the bundler reaches it.
|
|
15
16
|
async function resolveCypressCTTarget(tree, options) {
|
|
16
17
|
let found = { target: options.buildTarget, config: undefined };
|
|
18
|
+
const graph = await (0, devkit_1.createProjectGraphAsync)();
|
|
19
|
+
const parsed = options.buildTarget
|
|
20
|
+
? (0, devkit_1.parseTargetString)(options.buildTarget, graph)
|
|
21
|
+
: undefined;
|
|
22
|
+
const candidates = parsed
|
|
23
|
+
? [parsed.project]
|
|
24
|
+
: [
|
|
25
|
+
options.project,
|
|
26
|
+
...Object.keys(graph.dependencies).filter((name) => graph.dependencies[name].some((dep) => dep.target === options.project)),
|
|
27
|
+
];
|
|
28
|
+
for (const project of candidates) {
|
|
29
|
+
const native = await findNativeBuild(tree, project, parsed?.target);
|
|
30
|
+
if (native) {
|
|
31
|
+
return {
|
|
32
|
+
found: {
|
|
33
|
+
target: options.buildTarget ?? native.target,
|
|
34
|
+
config: { command: `${native.bundler} build` },
|
|
35
|
+
},
|
|
36
|
+
bundler: options.bundler ?? native.bundler,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
}
|
|
17
40
|
if (options.buildTarget === undefined) {
|
|
18
41
|
const { findBuildConfig, } = require('@nx/cypress/internal');
|
|
19
42
|
found = await findBuildConfig(tree, {
|
|
@@ -43,19 +66,8 @@ async function configureCypressCT(tree, options) {
|
|
|
43
66
|
const { addDefaultCTConfig, getProjectCypressConfigPath, getInstalledCypressMajorVersion, } = require('@nx/cypress/internal');
|
|
44
67
|
const ctConfigOptions = {
|
|
45
68
|
bundler: options.bundler,
|
|
69
|
+
buildTarget: found.target,
|
|
46
70
|
};
|
|
47
|
-
if (projectConfig.targets?.['component-test']?.executor ===
|
|
48
|
-
'@nx/cypress:cypress') {
|
|
49
|
-
projectConfig.targets['component-test'].options = {
|
|
50
|
-
...projectConfig.targets['component-test'].options,
|
|
51
|
-
devServerTarget: found.target,
|
|
52
|
-
skipServe: true,
|
|
53
|
-
};
|
|
54
|
-
(0, devkit_1.updateProjectConfiguration)(tree, options.project, projectConfig);
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
ctConfigOptions.buildTarget = found.target;
|
|
58
|
-
}
|
|
59
71
|
const cypressConfigFilePath = getProjectCypressConfigPath(tree, projectConfig.root);
|
|
60
72
|
const updatedCyConfig = await addDefaultCTConfig(tree.read(cypressConfigFilePath, 'utf-8'), ctConfigOptions, '@nx/react/plugins/component-testing', getInstalledCypressMajorVersion(tree));
|
|
61
73
|
tree.write(cypressConfigFilePath, updatedCyConfig);
|
|
@@ -71,9 +83,37 @@ async function getBundlerFromTarget(found, tree) {
|
|
|
71
83
|
}
|
|
72
84
|
const { target, project } = (0, devkit_1.parseTargetString)(found.target, await (0, devkit_1.createProjectGraphAsync)());
|
|
73
85
|
const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, project);
|
|
86
|
+
const native = await findNativeBuild(tree, project, target);
|
|
87
|
+
if (native)
|
|
88
|
+
return native.bundler;
|
|
74
89
|
const executor = projectConfig?.targets?.[target]?.executor;
|
|
75
90
|
return executor === '@nx/vite:build' ? 'vite' : 'webpack';
|
|
76
91
|
}
|
|
92
|
+
async function findNativeBuild(tree, project, target) {
|
|
93
|
+
const config = (0, devkit_1.readProjectConfiguration)(tree, project);
|
|
94
|
+
if (target &&
|
|
95
|
+
config.targets?.[target]?.executor &&
|
|
96
|
+
config.targets[target].executor !== 'nx:run-commands') {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
for (const bundler of ['vite', 'webpack']) {
|
|
100
|
+
for (const ext of ['ts', 'mts', 'cts', 'js', 'mjs', 'cjs']) {
|
|
101
|
+
const path = (0, devkit_1.joinPathFragments)(config.root, `${bundler}.config.${ext}`);
|
|
102
|
+
if (!tree.exists(path))
|
|
103
|
+
continue;
|
|
104
|
+
const plugin = await (0, internal_1.findPluginForConfigFile)(tree, `@nx/${bundler}/plugin`, path);
|
|
105
|
+
if (!plugin)
|
|
106
|
+
continue;
|
|
107
|
+
const buildTarget = typeof plugin === 'string'
|
|
108
|
+
? 'build'
|
|
109
|
+
: (plugin.options
|
|
110
|
+
?.buildTargetName ?? 'build');
|
|
111
|
+
if (target && target !== buildTarget)
|
|
112
|
+
continue;
|
|
113
|
+
return { target: `${project}:${buildTarget}`, bundler };
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
77
117
|
async function getActualBundler(tree, options, found) {
|
|
78
118
|
const actualBundler = options.buildTarget !== undefined && options.bundler
|
|
79
119
|
? options.bundler
|
|
@@ -82,7 +122,7 @@ async function getActualBundler(tree, options, found) {
|
|
|
82
122
|
}
|
|
83
123
|
function isComponent(tree, filePath) {
|
|
84
124
|
if (!tsModule) {
|
|
85
|
-
tsModule = (0,
|
|
125
|
+
tsModule = (0, internal_2.ensureTypescript)();
|
|
86
126
|
}
|
|
87
127
|
if (isSpecFile.test(filePath) || !allowedFileExt.test(filePath)) {
|
|
88
128
|
return false;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const REACT_WITH_REACT_DEPRECATION_MESSAGE = "The `withReact` config helper from `@nx/react`
|
|
1
|
+
export declare const REACT_WITH_REACT_DEPRECATION_MESSAGE = "The `withReact` config helper from `@nx/react` was removed in Nx v24. The remaining export is an inert compatibility stub and does not configure builds. Use `NxReactWebpackPlugin` from `@nx/react/webpack-plugin` in a standard webpack config. Follow the webpack config-helper migration instructions generated by `nx migrate`. Executor conversion is a separate migration.";
|
|
2
2
|
export declare function suppressReactComposeHelperWarnings<T>(fn: () => T): T;
|
|
3
3
|
export declare function warnReactWithReactDeprecation(): void;
|
|
@@ -4,11 +4,9 @@ exports.REACT_WITH_REACT_DEPRECATION_MESSAGE = void 0;
|
|
|
4
4
|
exports.suppressReactComposeHelperWarnings = suppressReactComposeHelperWarnings;
|
|
5
5
|
exports.warnReactWithReactDeprecation = warnReactWithReactDeprecation;
|
|
6
6
|
const devkit_1 = require("@nx/devkit");
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
|
|
10
|
-
// standard webpack configs built around NxReactWebpackPlugin instead.
|
|
11
|
-
exports.REACT_WITH_REACT_DEPRECATION_MESSAGE = 'The `withReact` config helper from `@nx/react` is deprecated and will be removed in Nx v24. It produces an Nx-specific webpack config function that only runs under the `@nx/webpack:webpack` executor. Migrate to a standard webpack config that uses `NxReactWebpackPlugin` (from `@nx/react/webpack-plugin`) under the inferred `@nx/webpack/plugin` by running `nx g @nx/webpack:convert-to-inferred`. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.';
|
|
7
|
+
// Helper behavior was removed in v24; exports remain only as inert stubs.
|
|
8
|
+
// Keep the export loadable while existing webpack configs are migrated.
|
|
9
|
+
exports.REACT_WITH_REACT_DEPRECATION_MESSAGE = 'The `withReact` config helper from `@nx/react` was removed in Nx v24. The remaining export is an inert compatibility stub and does not configure builds. Use `NxReactWebpackPlugin` from `@nx/react/webpack-plugin` in a standard webpack config. Follow the webpack config-helper migration instructions generated by `nx migrate`. Executor conversion is a separate migration.';
|
|
12
10
|
let withReactWarned = false;
|
|
13
11
|
let suppressDepth = 0;
|
|
14
12
|
// Nx-internal entry points compose `withReact` themselves (e.g. the storybook
|
|
@@ -32,13 +32,6 @@ export declare const tsLibVersion = "^2.3.0";
|
|
|
32
32
|
export declare const postcssVersion = "8.4.38";
|
|
33
33
|
export declare const autoprefixerVersion = "10.4.13";
|
|
34
34
|
export declare const expressVersion = "^4.21.2";
|
|
35
|
-
export declare const typesExpressVersion = "^4.17.21";
|
|
36
|
-
export declare const httpProxyMiddlewareVersion = "^3.0.5";
|
|
37
|
-
export declare const isbotVersion = "^3.6.5";
|
|
38
|
-
export declare const corsVersion = "~2.8.5";
|
|
39
|
-
export declare const typesCorsVersion = "~2.8.12";
|
|
40
|
-
export declare const moduleFederationNodeVersion = "^2.7.21";
|
|
41
|
-
export declare const moduleFederationEnhancedVersion = "^2.1.0";
|
|
42
35
|
export declare const sassVersion = "^1.97.2";
|
|
43
36
|
export declare const rollupPluginUrlVersion = "^8.0.2";
|
|
44
37
|
export declare const svgrRollupVersion = "^8.1.0";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.svgrWebpackVersion = exports.svgrRollupVersion = exports.rollupPluginUrlVersion = exports.sassVersion = exports.
|
|
3
|
+
exports.svgrWebpackVersion = exports.svgrRollupVersion = exports.rollupPluginUrlVersion = exports.sassVersion = exports.expressVersion = exports.autoprefixerVersion = exports.postcssVersion = exports.tsLibVersion = exports.eslintPluginReactHooksVersion = exports.eslintPluginReactVersion = exports.eslintPluginJsxA11yVersion = exports.eslintPluginImportVersion = exports.reactReduxVersion = exports.reduxjsToolkitVersion = exports.testingLibraryDomVersion = exports.testingLibraryReactVersion = exports.reactRouterIsBotVersion = exports.reactRouterVersion = exports.reactRouterDomVersion = exports.babelCoreVersion = exports.babelPresetReactVersion = exports.typesNodeVersion = exports.reactViteVersion = exports.typesReactIsVersion = exports.typesReactIsV18Version = exports.typesReactDomVersion = exports.typesReactDomV18Version = exports.typesReactVersion = exports.typesReactV18Version = exports.swcLoaderVersion = exports.reactIsV18Version = exports.reactIsVersion = exports.reactDomV18Version = exports.reactDomVersion = exports.reactV18Version = exports.reactVersion = exports.minSupportedReactVersion = exports.nxVersion = void 0;
|
|
4
4
|
const path_1 = require("path");
|
|
5
5
|
exports.nxVersion = require((0, path_1.join)('@nx/react', 'package.json')).version;
|
|
6
6
|
exports.minSupportedReactVersion = '18.0.0';
|
|
@@ -38,15 +38,8 @@ exports.eslintPluginReactHooksVersion = '5.0.0';
|
|
|
38
38
|
exports.tsLibVersion = '^2.3.0';
|
|
39
39
|
exports.postcssVersion = '8.4.38';
|
|
40
40
|
exports.autoprefixerVersion = '10.4.13';
|
|
41
|
-
// SSR
|
|
41
|
+
// SSR
|
|
42
42
|
exports.expressVersion = '^4.21.2';
|
|
43
|
-
exports.typesExpressVersion = '^4.17.21';
|
|
44
|
-
exports.httpProxyMiddlewareVersion = '^3.0.5';
|
|
45
|
-
exports.isbotVersion = '^3.6.5';
|
|
46
|
-
exports.corsVersion = '~2.8.5';
|
|
47
|
-
exports.typesCorsVersion = '~2.8.12';
|
|
48
|
-
exports.moduleFederationNodeVersion = '^2.7.21';
|
|
49
|
-
exports.moduleFederationEnhancedVersion = '^2.1.0';
|
|
50
43
|
// style preprocessors
|
|
51
44
|
exports.sassVersion = '^1.97.2';
|
|
52
45
|
// rollup plugins (if needed)
|
package/executors.json
CHANGED
|
@@ -1,19 +1,3 @@
|
|
|
1
1
|
{
|
|
2
|
-
"executors": {
|
|
3
|
-
"module-federation-dev-server": {
|
|
4
|
-
"implementation": "./dist/src/executors/module-federation-dev-server/module-federation-dev-server.impl",
|
|
5
|
-
"schema": "./dist/src/executors/module-federation-dev-server/schema.json",
|
|
6
|
-
"description": "Serve a host or remote application."
|
|
7
|
-
},
|
|
8
|
-
"module-federation-ssr-dev-server": {
|
|
9
|
-
"implementation": "./dist/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl",
|
|
10
|
-
"schema": "./dist/src/executors/module-federation-ssr-dev-server/schema.json",
|
|
11
|
-
"description": "Serve a host application along with it's known remotes."
|
|
12
|
-
},
|
|
13
|
-
"module-federation-static-server": {
|
|
14
|
-
"implementation": "./dist/src/executors/module-federation-static-server/module-federation-static-server.impl",
|
|
15
|
-
"schema": "./dist/src/executors/module-federation-static-server/schema.json",
|
|
16
|
-
"description": "Serve a host and its remotes statically."
|
|
17
|
-
}
|
|
18
|
-
}
|
|
2
|
+
"executors": {}
|
|
19
3
|
}
|
package/generators.json
CHANGED
|
@@ -60,20 +60,6 @@
|
|
|
60
60
|
"description": "Create a hook.",
|
|
61
61
|
"aliases": ["c"]
|
|
62
62
|
},
|
|
63
|
-
"host": {
|
|
64
|
-
"factory": "./dist/src/generators/host/host",
|
|
65
|
-
"schema": "./dist/src/generators/host/schema.json",
|
|
66
|
-
"x-type": "application",
|
|
67
|
-
"description": "Generate a host react application",
|
|
68
|
-
"x-deprecated": "Use `@nx/react:consumer` instead (dynamic federation, no static-serve orchestration). Removed in Nx v24."
|
|
69
|
-
},
|
|
70
|
-
"remote": {
|
|
71
|
-
"factory": "./dist/src/generators/remote/remote",
|
|
72
|
-
"schema": "./dist/src/generators/remote/schema.json",
|
|
73
|
-
"x-type": "application",
|
|
74
|
-
"description": "Generate a remote react application",
|
|
75
|
-
"x-deprecated": "Use `@nx/react:provider` instead. Removed in Nx v24."
|
|
76
|
-
},
|
|
77
63
|
"consumer": {
|
|
78
64
|
"factory": "./dist/src/generators/consumer/consumer",
|
|
79
65
|
"schema": "./dist/src/generators/consumer/schema.json",
|
|
@@ -97,19 +83,6 @@
|
|
|
97
83
|
"schema": "./dist/src/generators/component-test/schema.json",
|
|
98
84
|
"description": "Generate a Cypress component test for a React component",
|
|
99
85
|
"hidden": false
|
|
100
|
-
},
|
|
101
|
-
"setup-ssr": {
|
|
102
|
-
"factory": "./dist/src/generators/setup-ssr/setup-ssr#setupSsrGenerator",
|
|
103
|
-
"schema": "./dist/src/generators/setup-ssr/schema.json",
|
|
104
|
-
"description": "Set up SSR configuration for a project.",
|
|
105
|
-
"hidden": false
|
|
106
|
-
},
|
|
107
|
-
"federate-module": {
|
|
108
|
-
"factory": "./dist/src/generators/federate-module/federate-module#federateModuleGenerator",
|
|
109
|
-
"schema": "./dist/src/generators/federate-module/schema.json",
|
|
110
|
-
"description": "Federate a module.",
|
|
111
|
-
"hidden": false,
|
|
112
|
-
"x-deprecated": "The new `@nx/react:provider` generator exposes modules directly. Removed in Nx v24."
|
|
113
86
|
}
|
|
114
87
|
}
|
|
115
88
|
}
|
package/migrations.json
CHANGED
|
@@ -51,6 +51,12 @@
|
|
|
51
51
|
"description": "Add `@svgr/webpack` when a webpack config references it.",
|
|
52
52
|
"implementation": "./dist/src/migrations/update-23-2-0/add-svgr-webpack-if-used",
|
|
53
53
|
"documentation": "./dist/src/migrations/update-23-2-0/add-svgr-webpack-if-used.md"
|
|
54
|
+
},
|
|
55
|
+
"update-24-0-0-register-typescript-plugin-for-typecheck": {
|
|
56
|
+
"version": "24.0.0-beta.3",
|
|
57
|
+
"description": "Register @nx/js/typescript with its typecheck target in workspaces that use @nx/react/router-plugin without it, and remove the router plugin's typecheckTargetName option, since @nx/react/router-plugin no longer infers typecheck targets.",
|
|
58
|
+
"implementation": "./dist/src/migrations/update-24-0-0/register-typescript-plugin-for-typecheck",
|
|
59
|
+
"documentation": "./dist/src/migrations/update-24-0-0/register-typescript-plugin-for-typecheck.md"
|
|
54
60
|
}
|
|
55
61
|
},
|
|
56
62
|
"packageJsonUpdates": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/react",
|
|
3
|
-
"version": "24.0.0-beta.
|
|
3
|
+
"version": "24.0.0-beta.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": {
|
|
@@ -30,18 +30,12 @@
|
|
|
30
30
|
],
|
|
31
31
|
"typesVersions": {
|
|
32
32
|
"*": {
|
|
33
|
-
"mf": [
|
|
34
|
-
"dist/mf/index.d.ts"
|
|
35
|
-
],
|
|
36
33
|
"babel": [
|
|
37
34
|
"dist/babel.d.ts"
|
|
38
35
|
],
|
|
39
36
|
"tailwind": [
|
|
40
37
|
"dist/tailwind.d.ts"
|
|
41
38
|
],
|
|
42
|
-
"module-federation": [
|
|
43
|
-
"dist/module-federation.d.ts"
|
|
44
|
-
],
|
|
45
39
|
"webpack-plugin": [
|
|
46
40
|
"dist/webpack-plugin.d.ts"
|
|
47
41
|
],
|
|
@@ -93,23 +87,11 @@
|
|
|
93
87
|
"peerDependencies": {
|
|
94
88
|
"babel-plugin-react-compiler": "^1.0.0",
|
|
95
89
|
"react": ">=18.0.0 <20.0.0",
|
|
96
|
-
"react-dom": ">=18.0.0 <20.0.0"
|
|
97
|
-
"@nx/module-federation": "24.0.0-beta.1",
|
|
98
|
-
"express": "^4.21.2",
|
|
99
|
-
"http-proxy-middleware": "^3.0.7"
|
|
90
|
+
"react-dom": ">=18.0.0 <20.0.0"
|
|
100
91
|
},
|
|
101
92
|
"peerDependenciesMeta": {
|
|
102
93
|
"babel-plugin-react-compiler": {
|
|
103
94
|
"optional": true
|
|
104
|
-
},
|
|
105
|
-
"@nx/module-federation": {
|
|
106
|
-
"optional": true
|
|
107
|
-
},
|
|
108
|
-
"express": {
|
|
109
|
-
"optional": true
|
|
110
|
-
},
|
|
111
|
-
"http-proxy-middleware": {
|
|
112
|
-
"optional": true
|
|
113
95
|
}
|
|
114
96
|
},
|
|
115
97
|
"dependencies": {
|
|
@@ -117,28 +99,26 @@
|
|
|
117
99
|
"@phenomnomnominal/tsquery": "~6.2.0",
|
|
118
100
|
"minimatch": "10.2.5",
|
|
119
101
|
"tslib": "^2.3.0",
|
|
120
|
-
"@nx/devkit": "24.0.0-beta.
|
|
121
|
-
"@nx/js": "24.0.0-beta.
|
|
122
|
-
"@nx/eslint": "24.0.0-beta.
|
|
123
|
-
"@nx/web": "24.0.0-beta.
|
|
102
|
+
"@nx/devkit": "24.0.0-beta.3",
|
|
103
|
+
"@nx/js": "24.0.0-beta.3",
|
|
104
|
+
"@nx/eslint": "24.0.0-beta.3",
|
|
105
|
+
"@nx/web": "24.0.0-beta.3",
|
|
124
106
|
"semver": "^7.6.3"
|
|
125
107
|
},
|
|
126
108
|
"devDependencies": {
|
|
127
|
-
"@nx/cypress": "24.0.0-beta.
|
|
128
|
-
"@nx/
|
|
129
|
-
"@nx/
|
|
130
|
-
"@nx/
|
|
131
|
-
"@nx/
|
|
132
|
-
"@nx/vite": "24.0.0-beta.
|
|
133
|
-
"@nx/vitest": "24.0.0-beta.
|
|
134
|
-
"@nx/webpack": "24.0.0-beta.
|
|
135
|
-
"@nx/storybook": "24.0.0-beta.
|
|
136
|
-
"
|
|
137
|
-
"http-proxy-middleware": "^3.0.7",
|
|
138
|
-
"nx": "24.0.0-beta.1"
|
|
109
|
+
"@nx/cypress": "24.0.0-beta.3",
|
|
110
|
+
"@nx/playwright": "24.0.0-beta.3",
|
|
111
|
+
"@nx/rollup": "24.0.0-beta.3",
|
|
112
|
+
"@nx/rsbuild": "24.0.0-beta.3",
|
|
113
|
+
"@nx/rspack": "24.0.0-beta.3",
|
|
114
|
+
"@nx/vite": "24.0.0-beta.3",
|
|
115
|
+
"@nx/vitest": "24.0.0-beta.3",
|
|
116
|
+
"@nx/webpack": "24.0.0-beta.3",
|
|
117
|
+
"@nx/storybook": "24.0.0-beta.3",
|
|
118
|
+
"nx": "24.0.0-beta.3"
|
|
139
119
|
},
|
|
140
120
|
"optionalDependencies": {
|
|
141
|
-
"@nx/vite": "24.0.0-beta.
|
|
121
|
+
"@nx/vite": "24.0.0-beta.3"
|
|
142
122
|
},
|
|
143
123
|
"publishConfig": {
|
|
144
124
|
"access": "public"
|
|
@@ -153,11 +133,6 @@
|
|
|
153
133
|
"./migrations.json": "./migrations.json",
|
|
154
134
|
"./generators.json": "./generators.json",
|
|
155
135
|
"./executors.json": "./executors.json",
|
|
156
|
-
"./mf": {
|
|
157
|
-
"@nx/nx-source": "./mf/index.ts",
|
|
158
|
-
"types": "./dist/mf/index.d.ts",
|
|
159
|
-
"default": "./dist/mf/index.js"
|
|
160
|
-
},
|
|
161
136
|
"./babel": {
|
|
162
137
|
"@nx/nx-source": "./babel.ts",
|
|
163
138
|
"types": "./dist/babel.d.ts",
|
|
@@ -168,11 +143,6 @@
|
|
|
168
143
|
"types": "./dist/tailwind.d.ts",
|
|
169
144
|
"default": "./dist/tailwind.js"
|
|
170
145
|
},
|
|
171
|
-
"./module-federation": {
|
|
172
|
-
"@nx/nx-source": "./module-federation.ts",
|
|
173
|
-
"types": "./dist/module-federation.d.ts",
|
|
174
|
-
"default": "./dist/module-federation.js"
|
|
175
|
-
},
|
|
176
146
|
"./webpack-plugin": {
|
|
177
147
|
"@nx/nx-source": "./webpack-plugin.ts",
|
|
178
148
|
"types": "./dist/webpack-plugin.d.ts",
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
export type ResolveRemoteUrlFunction = (remoteName: string) => string | Promise<string>;
|
|
2
|
-
/**
|
|
3
|
-
* @deprecated Use Runtime Helpers from '@module-federation/enhanced/runtime' instead. This will be removed in Nx 22.
|
|
4
|
-
*/
|
|
5
|
-
export declare function setRemoteUrlResolver(_resolveRemoteUrl: ResolveRemoteUrlFunction): void;
|
|
6
|
-
/**
|
|
7
|
-
* @deprecated Use init() from '@module-federation/enhanced/runtime' instead. This will be removed in Nx 22.
|
|
8
|
-
* If you have a remote app called `my-remote-app` and you want to use the `http://localhost:4201/mf-manifest.json` as the remote url, you should change it from:
|
|
9
|
-
* ```ts
|
|
10
|
-
* import { setRemoteDefinitions } from '@nx/react/mf';
|
|
11
|
-
*
|
|
12
|
-
* setRemoteDefinitions({
|
|
13
|
-
* 'my-remote-app': 'http://localhost:4201/mf-manifest.json'
|
|
14
|
-
* });
|
|
15
|
-
* ```
|
|
16
|
-
* to use init():
|
|
17
|
-
* ```ts
|
|
18
|
-
* import { init } from '@module-federation/enhanced/runtime';
|
|
19
|
-
*
|
|
20
|
-
* init({
|
|
21
|
-
* name: 'host',
|
|
22
|
-
* remotes: [{
|
|
23
|
-
* name: 'my-remote-app',
|
|
24
|
-
* entry: 'http://localhost:4201/mf-manifest.json'
|
|
25
|
-
* }]
|
|
26
|
-
* });
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
29
|
-
export declare function setRemoteDefinitions(definitions: Record<string, string>): void;
|
|
30
|
-
/**
|
|
31
|
-
* @deprecated Use registerRemotes() from '@module-federation/enhanced/runtime' instead. This will be removed in Nx 22.
|
|
32
|
-
* If you set a remote app with `setRemoteDefinition` such as:
|
|
33
|
-
* ```ts
|
|
34
|
-
* import { setRemoteDefinition } from '@nx/react/mf';
|
|
35
|
-
*
|
|
36
|
-
* setRemoteDefinition(
|
|
37
|
-
* 'my-remote-app',
|
|
38
|
-
* 'http://localhost:4201/mf-manifest.json'
|
|
39
|
-
* );
|
|
40
|
-
* ```
|
|
41
|
-
* change it to use registerRemotes():
|
|
42
|
-
* ```ts
|
|
43
|
-
* import { registerRemotes } from '@module-federation/enhanced/runtime';
|
|
44
|
-
*
|
|
45
|
-
* registerRemotes([
|
|
46
|
-
* {
|
|
47
|
-
* name: 'my-remote-app',
|
|
48
|
-
* entry: 'http://localhost:4201/mf-manifest.json'
|
|
49
|
-
* }
|
|
50
|
-
* ]);
|
|
51
|
-
* ```
|
|
52
|
-
*/
|
|
53
|
-
export declare function setRemoteDefinition(remoteName: string, remoteUrl: string): void;
|
|
54
|
-
/**
|
|
55
|
-
* @deprecated Use loadRemote() from '@module-federation/enhanced/runtime' instead. This will be removed in Nx 22.
|
|
56
|
-
* If you set a load a remote with `loadRemoteModule` such as:
|
|
57
|
-
* ```ts
|
|
58
|
-
* import { loadRemoteModule } from '@nx/react/mf';
|
|
59
|
-
*
|
|
60
|
-
* loadRemoteModule('my-remote-app', './Module').then(m => m.RemoteEntryModule);
|
|
61
|
-
* ```
|
|
62
|
-
* change it to use loadRemote():
|
|
63
|
-
* ```ts
|
|
64
|
-
* import { loadRemote } from '@module-federation/enhanced/runtime';
|
|
65
|
-
*
|
|
66
|
-
* loadRemote<typeof import('my-remote-app/Module')>('my-remote-app/Module').then(m => m.RemoteEntryModule);
|
|
67
|
-
* ```
|
|
68
|
-
*/
|
|
69
|
-
export declare function loadRemoteModule(remoteName: string, moduleName: string): Promise<any>;
|