@nx/react 21.6.0-canary.20250917-93fcc48 → 21.6.0-canary.20250923-146f577

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/react",
3
- "version": "21.6.0-canary.20250917-93fcc48",
3
+ "version": "21.6.0-canary.20250923-146f577",
4
4
  "private": false,
5
5
  "description": "The React plugin for Nx contains executors and generators for managing React applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Vitest, Playwright, Cypress, and Storybook.\n\n- Generators for applications, libraries, components, hooks, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
6
6
  "repository": {
@@ -38,19 +38,19 @@
38
38
  "minimatch": "9.0.3",
39
39
  "picocolors": "^1.1.0",
40
40
  "tslib": "^2.3.0",
41
- "@nx/devkit": "21.6.0-canary.20250917-93fcc48",
42
- "@nx/js": "21.6.0-canary.20250917-93fcc48",
43
- "@nx/eslint": "21.6.0-canary.20250917-93fcc48",
44
- "@nx/web": "21.6.0-canary.20250917-93fcc48",
45
- "@nx/vite": "21.6.0-canary.20250917-93fcc48",
46
- "@nx/module-federation": "21.6.0-canary.20250917-93fcc48",
47
- "@nx/rollup": "21.6.0-canary.20250917-93fcc48",
41
+ "@nx/devkit": "21.6.0-canary.20250923-146f577",
42
+ "@nx/js": "21.6.0-canary.20250923-146f577",
43
+ "@nx/eslint": "21.6.0-canary.20250923-146f577",
44
+ "@nx/web": "21.6.0-canary.20250923-146f577",
45
+ "@nx/vite": "21.6.0-canary.20250923-146f577",
46
+ "@nx/module-federation": "21.6.0-canary.20250923-146f577",
47
+ "@nx/rollup": "21.6.0-canary.20250923-146f577",
48
48
  "express": "^4.21.2",
49
49
  "http-proxy-middleware": "^3.0.5",
50
50
  "semver": "^7.6.3"
51
51
  },
52
52
  "devDependencies": {
53
- "nx": "21.6.0-canary.20250917-93fcc48"
53
+ "nx": "21.6.0-canary.20250923-146f577"
54
54
  },
55
55
  "publishConfig": {
56
56
  "access": "public"
@@ -1 +1 @@
1
- {"version":3,"file":"application.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/application/application.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAIjB,IAAI,EAGL,MAAM,YAAY,CAAC;AAoCpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIlC,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,iBAAiB,CAAC,CAM5B;AAED,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,iBAAiB,CAAC,CAmM5B;AAED,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"application.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/application/application.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAIjB,IAAI,EAGL,MAAM,YAAY,CAAC;AAoCpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIlC,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,iBAAiB,CAAC,CAM5B;AAED,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,iBAAiB,CAAC,CAoM5B;AAED,eAAe,oBAAoB,CAAC"}
@@ -71,6 +71,7 @@ async function applicationGeneratorInternal(tree, schema) {
71
71
  const initTask = await (0, init_1.default)(tree, {
72
72
  ...options,
73
73
  skipFormat: true,
74
+ useReactRouterPlugin: options.useReactRouter,
74
75
  });
75
76
  tasks.push(initTask);
76
77
  if (!options.addPlugin) {
@@ -22,7 +22,7 @@ async function reactInitGenerator(tree, schema) {
22
22
  schema.addPlugin ??=
23
23
  process.env.NX_ADD_PLUGINS !== 'false' &&
24
24
  nxJson.useInferencePlugins !== false;
25
- if (schema.addPlugin) {
25
+ if (schema.useReactRouterPlugin && schema.addPlugin) {
26
26
  await (0, add_plugin_1.addPlugin)(tree, await (0, devkit_1.createProjectGraphAsync)(), '@nx/react/router-plugin', router_plugin_1.createNodesV2, {
27
27
  buildTargetName: ['build', 'react-router:build', 'react-router-build'],
28
28
  devTargetName: ['dev', 'react-router:dev', 'react-router-dev'],
@@ -4,4 +4,5 @@ export interface InitSchema {
4
4
  keepExistingVersions?: boolean;
5
5
  updatePackageScripts?: boolean;
6
6
  addPlugin?: boolean;
7
+ useReactRouterPlugin?: boolean;
7
8
  }
@@ -21,6 +21,12 @@
21
21
  "x-priority": "internal",
22
22
  "description": "Keep existing dependencies versions",
23
23
  "default": false
24
+ },
25
+ "useReactRouterPlugin": {
26
+ "type": "boolean",
27
+ "x-priority": "internal",
28
+ "description": "Add the @nx/react/router-plugin to the nx.json plugins array. Only use this if using React Router for SSR/RSC.",
29
+ "default": false
24
30
  }
25
31
  },
26
32
  "required": []
@@ -1 +1 @@
1
- {"version":3,"file":"add-linting.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react/src/generators/library/lib/add-linting.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAG9C,OAAO,EAEL,iBAAiB,EAElB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAU7C,wBAAsB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,8BAwDrE"}
1
+ {"version":3,"file":"add-linting.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react/src/generators/library/lib/add-linting.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAG9C,OAAO,EAEL,iBAAiB,EAElB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAW7C,wBAAsB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,8BA6DrE"}
@@ -39,6 +39,10 @@ async function addLinting(host, options) {
39
39
  });
40
40
  tasks.push(addExtendsTask);
41
41
  }
42
+ // Add out-tsc ignore pattern when using TS solution setup
43
+ if (options.isUsingTsSolutionConfig) {
44
+ (0, eslint_file_1.addIgnoresToLintConfig)(host, options.projectRoot, ['**/out-tsc']);
45
+ }
42
46
  }
43
47
  let installTask = () => { };
44
48
  if (!options.skipPackageJson) {
@@ -1 +1 @@
1
- {"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/library/library.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,iBAAiB,EAOjB,IAAI,EAGL,MAAM,YAAY,CAAC;AAiCpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAMhE;AAED,wBAAsB,wBAAwB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BA4RxE;AAED,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/library/library.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,iBAAiB,EAOjB,IAAI,EAGL,MAAM,YAAY,CAAC;AAiCpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAMhE;AAED,wBAAsB,wBAAwB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BA6RxE;AAED,eAAe,gBAAgB,CAAC"}
@@ -57,6 +57,7 @@ async function libraryGeneratorInternal(host, schema) {
57
57
  const initTask = await (0, init_1.default)(host, {
58
58
  ...options,
59
59
  skipFormat: true,
60
+ useReactRouterPlugin: false,
60
61
  });
61
62
  tasks.push(initTask);
62
63
  const packageJson = {