@nx/react 24.0.0-pr.37405.acdaf31 → 24.0.0-rc.0
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/module-federation.d.ts +6 -5
- package/dist/module-federation.js +29 -18
- 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/ready-check.d.ts +1 -0
- package/dist/ready-check.js +5 -0
- package/dist/src/generators/_utils/mf-dependencies.js +3 -0
- 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 +11 -11
- package/dist/src/generators/application/lib/add-linting.js +1 -2
- 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 -2
- 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 -6
- package/dist/src/generators/application/schema.json +0 -6
- package/dist/src/generators/consumer/consumer.js +2 -0
- package/dist/src/generators/consumer/files/rsbuild/package.json__tmpl__ +1 -0
- package/dist/src/generators/consumer/files/rsbuild/rsbuild.config.ts__tmpl__ +2 -0
- package/dist/src/generators/consumer/files/rspack/package.json__tmpl__ +1 -0
- package/dist/src/generators/consumer/files/rspack/rspack.config.ts__tmpl__ +2 -0
- package/dist/src/generators/consumer/files/vite/package.json__tmpl__ +1 -0
- package/dist/src/generators/consumer/files/vite/vite.config.mts__tmpl__ +2 -0
- package/dist/src/generators/cypress-component-configuration/cypress-component-configuration.js +4 -16
- package/dist/src/generators/cypress-component-configuration/lib/add-files.d.ts +1 -2
- package/dist/src/generators/cypress-component-configuration/lib/add-files.js +4 -2
- 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 +1 -2
- 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 -5
- package/dist/src/generators/library/schema.json +0 -6
- package/dist/src/generators/provider/files/rsbuild/package.json__tmpl__ +1 -0
- package/dist/src/generators/provider/files/rsbuild/rsbuild.config.ts__tmpl__ +2 -0
- package/dist/src/generators/provider/files/rspack/package.json__tmpl__ +1 -0
- package/dist/src/generators/provider/files/rspack/rspack.config.ts__tmpl__ +2 -0
- package/dist/src/generators/provider/files/vite/package.json__tmpl__ +1 -0
- package/dist/src/generators/provider/files/vite/vite.config.mts__tmpl__ +2 -0
- package/dist/src/generators/provider/provider.js +2 -0
- package/dist/src/generators/stories/stories.js +0 -5
- 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-utils.d.ts +4 -0
- package/dist/src/plugins/router-plugin-utils.js +15 -0
- package/dist/src/plugins/router-plugin.d.ts +0 -1
- package/dist/src/plugins/router-plugin.js +35 -44
- 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.d.ts +0 -7
- package/dist/src/utils/ct-utils.js +71 -55
- package/dist/src/utils/deprecation.d.ts +1 -1
- package/dist/src/utils/deprecation.js +3 -5
- package/dist/src/utils/framework.js +1 -3
- package/dist/src/utils/react-router-serve-ready-check.d.ts +11 -0
- package/dist/src/utils/react-router-serve-ready-check.js +25 -0
- 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 +25 -39
- 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/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
|
@@ -2,40 +2,60 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.resolveCypressCTTarget = resolveCypressCTTarget;
|
|
4
4
|
exports.configureCypressCT = configureCypressCT;
|
|
5
|
-
exports.getBundlerFromTarget = getBundlerFromTarget;
|
|
6
|
-
exports.getActualBundler = getActualBundler;
|
|
7
5
|
exports.isComponent = isComponent;
|
|
8
6
|
const devkit_1 = require("@nx/devkit");
|
|
9
|
-
const internal_1 = require("@nx/
|
|
7
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
8
|
+
const internal_2 = require("@nx/js/internal");
|
|
10
9
|
const ast_utils_1 = require("./ast-utils");
|
|
11
10
|
let tsModule;
|
|
12
11
|
const allowedFileExt = new RegExp(/\.[jt]sx?/);
|
|
13
12
|
const isSpecFile = new RegExp(/(spec|test)\./);
|
|
14
13
|
// Resolved before the shared cypress generator runs, so the bundler reaches it.
|
|
15
14
|
async function resolveCypressCTTarget(tree, options) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
if (
|
|
32
|
-
|
|
15
|
+
const graph = await (0, devkit_1.createProjectGraphAsync)();
|
|
16
|
+
const parsed = options.buildTarget
|
|
17
|
+
? (0, devkit_1.parseTargetString)(options.buildTarget, graph)
|
|
18
|
+
: undefined;
|
|
19
|
+
const candidates = parsed
|
|
20
|
+
? [parsed.project]
|
|
21
|
+
: [
|
|
22
|
+
options.project,
|
|
23
|
+
...Object.keys(graph.dependencies).filter((name) => graph.dependencies[name].some((dep) => dep.target === options.project)),
|
|
24
|
+
];
|
|
25
|
+
let overridden;
|
|
26
|
+
for (const project of candidates) {
|
|
27
|
+
const native = await findNativeBuild(tree, project, parsed?.target);
|
|
28
|
+
if (!native)
|
|
29
|
+
continue;
|
|
30
|
+
if (native.overridingExecutor) {
|
|
31
|
+
overridden ??= {
|
|
32
|
+
project,
|
|
33
|
+
target: native.target,
|
|
34
|
+
executor: native.overridingExecutor,
|
|
35
|
+
};
|
|
36
|
+
continue;
|
|
33
37
|
}
|
|
38
|
+
return {
|
|
39
|
+
found: {
|
|
40
|
+
target: options.buildTarget ?? native.target,
|
|
41
|
+
config: { command: `${native.bundler} build` },
|
|
42
|
+
},
|
|
43
|
+
bundler: native.bundler,
|
|
44
|
+
};
|
|
34
45
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
46
|
+
if (parsed) {
|
|
47
|
+
const executor = (0, devkit_1.readProjectConfiguration)(tree, parsed.project).targets?.[parsed.target]?.executor;
|
|
48
|
+
throw notInferredBuildTargetError(options.buildTarget, parsed.project, executor);
|
|
49
|
+
}
|
|
50
|
+
if (overridden) {
|
|
51
|
+
throw notInferredBuildTargetError(overridden.target, overridden.project, overridden.executor);
|
|
52
|
+
}
|
|
53
|
+
throw new Error(`Unable to find a build target inferred by @nx/vite/plugin or @nx/webpack/plugin for project "${options.project}" or the projects that depend on it. Pass one with --build-target=<project>:<target>[:<configuration>].`);
|
|
54
|
+
}
|
|
55
|
+
function notInferredBuildTargetError(buildTarget, project, executor) {
|
|
56
|
+
return new Error(`Cypress Component Testing needs a build target inferred by @nx/vite/plugin or @nx/webpack/plugin, and "${buildTarget}" is not one.${executor && executor !== 'nx:run-commands'
|
|
57
|
+
? ` It uses the "${executor}" executor. Convert it to an inferred target first, for example with "nx g @nx/workspace:infer-targets --project=${project}".`
|
|
58
|
+
: ''}`);
|
|
39
59
|
}
|
|
40
60
|
async function configureCypressCT(tree, options) {
|
|
41
61
|
const { found } = options;
|
|
@@ -43,46 +63,42 @@ async function configureCypressCT(tree, options) {
|
|
|
43
63
|
const { addDefaultCTConfig, getProjectCypressConfigPath, getInstalledCypressMajorVersion, } = require('@nx/cypress/internal');
|
|
44
64
|
const ctConfigOptions = {
|
|
45
65
|
bundler: options.bundler,
|
|
66
|
+
buildTarget: found.target,
|
|
46
67
|
};
|
|
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
68
|
const cypressConfigFilePath = getProjectCypressConfigPath(tree, projectConfig.root);
|
|
60
69
|
const updatedCyConfig = await addDefaultCTConfig(tree.read(cypressConfigFilePath, 'utf-8'), ctConfigOptions, '@nx/react/plugins/component-testing', getInstalledCypressMajorVersion(tree));
|
|
61
70
|
tree.write(cypressConfigFilePath, updatedCyConfig);
|
|
62
71
|
}
|
|
63
|
-
function
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
72
|
+
async function findNativeBuild(tree, project, target) {
|
|
73
|
+
const config = (0, devkit_1.readProjectConfiguration)(tree, project);
|
|
74
|
+
for (const bundler of ['vite', 'webpack']) {
|
|
75
|
+
for (const ext of ['ts', 'mts', 'cts', 'js', 'mjs', 'cjs']) {
|
|
76
|
+
const path = (0, devkit_1.joinPathFragments)(config.root, `${bundler}.config.${ext}`);
|
|
77
|
+
if (!tree.exists(path))
|
|
78
|
+
continue;
|
|
79
|
+
const plugin = await (0, internal_1.findPluginForConfigFile)(tree, `@nx/${bundler}/plugin`, path);
|
|
80
|
+
if (!plugin)
|
|
81
|
+
continue;
|
|
82
|
+
const buildTarget = typeof plugin === 'string'
|
|
83
|
+
? 'build'
|
|
84
|
+
: (plugin.options
|
|
85
|
+
?.buildTargetName ?? 'build');
|
|
86
|
+
if (target && target !== buildTarget)
|
|
87
|
+
continue;
|
|
88
|
+
// A project.json or package.json target on another executor replaces the
|
|
89
|
+
// inferred one (nx.json targetDefaults can't change its executor).
|
|
90
|
+
const executor = config.targets?.[buildTarget]?.executor;
|
|
91
|
+
return {
|
|
92
|
+
target: `${project}:${buildTarget}`,
|
|
93
|
+
bundler,
|
|
94
|
+
overridingExecutor: executor && executor !== 'nx:run-commands' ? executor : undefined,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
71
97
|
}
|
|
72
|
-
const { target, project } = (0, devkit_1.parseTargetString)(found.target, await (0, devkit_1.createProjectGraphAsync)());
|
|
73
|
-
const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, project);
|
|
74
|
-
const executor = projectConfig?.targets?.[target]?.executor;
|
|
75
|
-
return executor === '@nx/vite:build' ? 'vite' : 'webpack';
|
|
76
|
-
}
|
|
77
|
-
async function getActualBundler(tree, options, found) {
|
|
78
|
-
const actualBundler = options.buildTarget !== undefined && options.bundler
|
|
79
|
-
? options.bundler
|
|
80
|
-
: await getBundlerFromTarget(found, tree);
|
|
81
|
-
return actualBundler;
|
|
82
98
|
}
|
|
83
99
|
function isComponent(tree, filePath) {
|
|
84
100
|
if (!tsModule) {
|
|
85
|
-
tsModule = (0,
|
|
101
|
+
tsModule = (0, internal_2.ensureTypescript)();
|
|
86
102
|
}
|
|
87
103
|
if (isSpecFile.test(filePath) || !allowedFileExt.test(filePath)) {
|
|
88
104
|
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
|
|
@@ -4,9 +4,7 @@ exports.getUiFramework = getUiFramework;
|
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
function getUiFramework(tree, project) {
|
|
6
6
|
const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, project);
|
|
7
|
-
if (findWebpackConfig(tree, projectConfig.root)
|
|
8
|
-
projectConfig.targets?.['build']?.executor === '@nx/rollup:rollup' ||
|
|
9
|
-
projectConfig.targets?.['build']?.executor === '@nx/expo:build') {
|
|
7
|
+
if (findWebpackConfig(tree, projectConfig.root)) {
|
|
10
8
|
return '@storybook/react-webpack5';
|
|
11
9
|
}
|
|
12
10
|
return '@storybook/react-vite';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ServerAddress } from '@nx/devkit/internal';
|
|
2
|
+
/**
|
|
3
|
+
* Where `react-router-serve` listens: on PORT and HOST from its env, or on
|
|
4
|
+
* 3000 when PORT is unset and 3000 is free.
|
|
5
|
+
*/
|
|
6
|
+
export declare function getReactRouterServeAddress(env: NodeJS.ProcessEnv): ServerAddress | null;
|
|
7
|
+
/**
|
|
8
|
+
* The readyWhen of the inferred `react-router-serve` target. Runs in the env of
|
|
9
|
+
* the task and waits for the server's port.
|
|
10
|
+
*/
|
|
11
|
+
export declare function waitForReactRouterServe(): Promise<void>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getReactRouterServeAddress = getReactRouterServeAddress;
|
|
4
|
+
exports.waitForReactRouterServe = waitForReactRouterServe;
|
|
5
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
6
|
+
/**
|
|
7
|
+
* Where `react-router-serve` listens: on PORT and HOST from its env, or on
|
|
8
|
+
* 3000 when PORT is unset and 3000 is free.
|
|
9
|
+
*/
|
|
10
|
+
function getReactRouterServeAddress(env) {
|
|
11
|
+
// react-router-serve reads PORT with Number() and ignores only NaN, so an
|
|
12
|
+
// empty PORT is port 0, which the server picks
|
|
13
|
+
const port = Number(env.PORT);
|
|
14
|
+
return (0, internal_1.getServerAddress)(Number.isNaN(port) ? 3000 : port, env.HOST);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The readyWhen of the inferred `react-router-serve` target. Runs in the env of
|
|
18
|
+
* the task and waits for the server's port.
|
|
19
|
+
*/
|
|
20
|
+
async function waitForReactRouterServe() {
|
|
21
|
+
await (0, internal_1.runReadyCheck)(async () => {
|
|
22
|
+
const address = getReactRouterServeAddress(process.env);
|
|
23
|
+
return address ? [address] : null;
|
|
24
|
+
});
|
|
25
|
+
}
|
|
@@ -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-
|
|
3
|
+
"version": "24.0.0-rc.0",
|
|
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,9 +30,6 @@
|
|
|
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
|
],
|
|
@@ -48,6 +45,9 @@
|
|
|
48
45
|
"router-plugin": [
|
|
49
46
|
"dist/router-plugin.d.ts"
|
|
50
47
|
],
|
|
48
|
+
"ready-check": [
|
|
49
|
+
"dist/ready-check.d.ts"
|
|
50
|
+
],
|
|
51
51
|
"ast-utils": [
|
|
52
52
|
"dist/ast-utils.d.ts"
|
|
53
53
|
],
|
|
@@ -93,23 +93,11 @@
|
|
|
93
93
|
"peerDependencies": {
|
|
94
94
|
"babel-plugin-react-compiler": "^1.0.0",
|
|
95
95
|
"react": ">=18.0.0 <20.0.0",
|
|
96
|
-
"react-dom": ">=18.0.0 <20.0.0"
|
|
97
|
-
"@nx/module-federation": "24.0.0-pr.37405.acdaf31",
|
|
98
|
-
"express": "^4.21.2",
|
|
99
|
-
"http-proxy-middleware": "^3.0.7"
|
|
96
|
+
"react-dom": ">=18.0.0 <20.0.0"
|
|
100
97
|
},
|
|
101
98
|
"peerDependenciesMeta": {
|
|
102
99
|
"babel-plugin-react-compiler": {
|
|
103
100
|
"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
101
|
}
|
|
114
102
|
},
|
|
115
103
|
"dependencies": {
|
|
@@ -117,28 +105,26 @@
|
|
|
117
105
|
"@phenomnomnominal/tsquery": "~6.2.0",
|
|
118
106
|
"minimatch": "10.2.5",
|
|
119
107
|
"tslib": "^2.3.0",
|
|
120
|
-
"@nx/devkit": "24.0.0-
|
|
121
|
-
"@nx/js": "24.0.0-
|
|
122
|
-
"@nx/eslint": "24.0.0-
|
|
123
|
-
"@nx/web": "24.0.0-
|
|
108
|
+
"@nx/devkit": "24.0.0-rc.0",
|
|
109
|
+
"@nx/js": "24.0.0-rc.0",
|
|
110
|
+
"@nx/eslint": "24.0.0-rc.0",
|
|
111
|
+
"@nx/web": "24.0.0-rc.0",
|
|
124
112
|
"semver": "^7.6.3"
|
|
125
113
|
},
|
|
126
114
|
"devDependencies": {
|
|
127
|
-
"@nx/cypress": "24.0.0-
|
|
128
|
-
"@nx/
|
|
129
|
-
"@nx/
|
|
130
|
-
"@nx/
|
|
131
|
-
"@nx/
|
|
132
|
-
"@nx/vite": "24.0.0-
|
|
133
|
-
"@nx/vitest": "24.0.0-
|
|
134
|
-
"@nx/webpack": "24.0.0-
|
|
135
|
-
"@nx/storybook": "24.0.0-
|
|
136
|
-
"
|
|
137
|
-
"http-proxy-middleware": "^3.0.7",
|
|
138
|
-
"nx": "24.0.0-pr.37405.acdaf31"
|
|
115
|
+
"@nx/cypress": "24.0.0-rc.0",
|
|
116
|
+
"@nx/playwright": "24.0.0-rc.0",
|
|
117
|
+
"@nx/rollup": "24.0.0-rc.0",
|
|
118
|
+
"@nx/rsbuild": "24.0.0-rc.0",
|
|
119
|
+
"@nx/rspack": "24.0.0-rc.0",
|
|
120
|
+
"@nx/vite": "24.0.0-rc.0",
|
|
121
|
+
"@nx/vitest": "24.0.0-rc.0",
|
|
122
|
+
"@nx/webpack": "24.0.0-rc.0",
|
|
123
|
+
"@nx/storybook": "24.0.0-rc.0",
|
|
124
|
+
"nx": "24.0.0-rc.0"
|
|
139
125
|
},
|
|
140
126
|
"optionalDependencies": {
|
|
141
|
-
"@nx/vite": "24.0.0-
|
|
127
|
+
"@nx/vite": "24.0.0-rc.0"
|
|
142
128
|
},
|
|
143
129
|
"publishConfig": {
|
|
144
130
|
"access": "public"
|
|
@@ -153,11 +139,6 @@
|
|
|
153
139
|
"./migrations.json": "./migrations.json",
|
|
154
140
|
"./generators.json": "./generators.json",
|
|
155
141
|
"./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
142
|
"./babel": {
|
|
162
143
|
"@nx/nx-source": "./babel.ts",
|
|
163
144
|
"types": "./dist/babel.d.ts",
|
|
@@ -183,6 +164,11 @@
|
|
|
183
164
|
"types": "./dist/router-plugin.d.ts",
|
|
184
165
|
"default": "./dist/router-plugin.js"
|
|
185
166
|
},
|
|
167
|
+
"./ready-check": {
|
|
168
|
+
"@nx/nx-source": "./ready-check.ts",
|
|
169
|
+
"types": "./dist/ready-check.d.ts",
|
|
170
|
+
"default": "./dist/ready-check.js"
|
|
171
|
+
},
|
|
186
172
|
"./ast-utils": {
|
|
187
173
|
"@nx/nx-source": "./ast-utils.ts",
|
|
188
174
|
"types": "./dist/ast-utils.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>;
|