@nx/react 24.0.0-beta.2 → 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.
Files changed (204) hide show
  1. package/dist/index.d.ts +0 -2
  2. package/dist/index.js +1 -5
  3. package/dist/internal.d.ts +1 -0
  4. package/dist/internal.js +3 -1
  5. package/dist/plugins/component-testing/index.js +92 -33
  6. package/dist/plugins/storybook/index.js +18 -18
  7. package/dist/plugins/with-react.d.ts +3 -7
  8. package/dist/plugins/with-react.js +5 -19
  9. package/dist/src/generators/application/application.js +1 -36
  10. package/dist/src/generators/application/files/base-rspack/rspack.config.js__tmpl__ +1 -24
  11. package/dist/src/generators/application/files/base-webpack/webpack.config.js__tmpl__ +1 -26
  12. package/dist/src/generators/application/lib/add-e2e.js +5 -6
  13. package/dist/src/generators/application/lib/add-linting.js +0 -1
  14. package/dist/src/generators/application/lib/add-project.js +0 -167
  15. package/dist/src/generators/application/lib/bundlers/add-rsbuild.js +0 -1
  16. package/dist/src/generators/application/lib/bundlers/add-vite.js +0 -2
  17. package/dist/src/generators/application/lib/bundlers/add-webpack.js +0 -1
  18. package/dist/src/generators/application/lib/create-application-files.d.ts +0 -1
  19. package/dist/src/generators/application/lib/create-application-files.js +2 -11
  20. package/dist/src/generators/application/lib/normalize-options.js +0 -4
  21. package/dist/src/generators/application/schema.d.ts +0 -2
  22. package/dist/src/generators/cypress-component-configuration/cypress-component-configuration.js +1 -9
  23. package/dist/src/generators/cypress-component-configuration/schema.d.ts +0 -1
  24. package/dist/src/generators/init/init.js +3 -5
  25. package/dist/src/generators/init/schema.d.ts +0 -1
  26. package/dist/src/generators/library/lib/add-linting.js +0 -1
  27. package/dist/src/generators/library/lib/add-rollup-build-target.js +3 -47
  28. package/dist/src/generators/library/lib/normalize-options.js +0 -4
  29. package/dist/src/generators/library/library.js +1 -4
  30. package/dist/src/generators/library/schema.d.ts +0 -1
  31. package/dist/src/generators/storybook-configuration/configuration.js +1 -9
  32. package/dist/src/generators/storybook-configuration/schema.d.ts +0 -1
  33. package/dist/src/migrations/update-23-2-0/add-optional-module-federation-packages.js +2 -1
  34. package/dist/src/migrations/update-24-0-0/register-typescript-plugin-for-typecheck.d.ts +4 -0
  35. package/dist/src/migrations/update-24-0-0/register-typescript-plugin-for-typecheck.js +13 -0
  36. package/dist/src/migrations/update-24-0-0/register-typescript-plugin-for-typecheck.md +40 -0
  37. package/dist/src/plugins/router-plugin.d.ts +0 -1
  38. package/dist/src/plugins/router-plugin.js +5 -42
  39. package/dist/src/utils/ast-utils.d.ts +0 -1
  40. package/dist/src/utils/ast-utils.js +0 -23
  41. package/dist/src/utils/ct-utils.js +54 -14
  42. package/dist/src/utils/deprecation.d.ts +1 -1
  43. package/dist/src/utils/deprecation.js +3 -5
  44. package/dist/src/utils/versions.d.ts +0 -7
  45. package/dist/src/utils/versions.js +2 -9
  46. package/executors.json +1 -17
  47. package/generators.json +0 -27
  48. package/migrations.json +6 -0
  49. package/package.json +17 -47
  50. package/dist/mf/dynamic-federation.d.ts +0 -69
  51. package/dist/mf/dynamic-federation.js +0 -141
  52. package/dist/mf/index.d.ts +0 -1
  53. package/dist/mf/index.js +0 -8
  54. package/dist/module-federation.d.ts +0 -5
  55. package/dist/module-federation.js +0 -20
  56. package/dist/src/executors/module-federation-dev-server/lib/index.d.ts +0 -2
  57. package/dist/src/executors/module-federation-dev-server/lib/index.js +0 -5
  58. package/dist/src/executors/module-federation-dev-server/lib/normalize-options.d.ts +0 -4
  59. package/dist/src/executors/module-federation-dev-server/lib/normalize-options.js +0 -19
  60. package/dist/src/executors/module-federation-dev-server/lib/start-remotes.d.ts +0 -5
  61. package/dist/src/executors/module-federation-dev-server/lib/start-remotes.js +0 -33
  62. package/dist/src/executors/module-federation-dev-server/module-federation-dev-server.impl.d.ts +0 -6
  63. package/dist/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js +0 -80
  64. package/dist/src/executors/module-federation-dev-server/schema.d.ts +0 -19
  65. package/dist/src/executors/module-federation-dev-server/schema.json +0 -142
  66. package/dist/src/executors/module-federation-ssr-dev-server/lib/index.d.ts +0 -2
  67. package/dist/src/executors/module-federation-ssr-dev-server/lib/index.js +0 -5
  68. package/dist/src/executors/module-federation-ssr-dev-server/lib/normalize-options.d.ts +0 -4
  69. package/dist/src/executors/module-federation-ssr-dev-server/lib/normalize-options.js +0 -23
  70. package/dist/src/executors/module-federation-ssr-dev-server/lib/start-remotes.d.ts +0 -5
  71. package/dist/src/executors/module-federation-ssr-dev-server/lib/start-remotes.js +0 -34
  72. package/dist/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.d.ts +0 -3
  73. package/dist/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js +0 -83
  74. package/dist/src/executors/module-federation-ssr-dev-server/schema.d.ts +0 -29
  75. package/dist/src/executors/module-federation-ssr-dev-server/schema.json +0 -81
  76. package/dist/src/executors/module-federation-static-server/module-federation-static-server.impl.d.ts +0 -12
  77. package/dist/src/executors/module-federation-static-server/module-federation-static-server.impl.js +0 -244
  78. package/dist/src/executors/module-federation-static-server/schema.d.ts +0 -3
  79. package/dist/src/executors/module-federation-static-server/schema.json +0 -16
  80. package/dist/src/generators/federate-module/federate-module.d.ts +0 -4
  81. package/dist/src/generators/federate-module/federate-module.js +0 -67
  82. package/dist/src/generators/federate-module/lib/utils.d.ts +0 -23
  83. package/dist/src/generators/federate-module/lib/utils.js +0 -99
  84. package/dist/src/generators/federate-module/schema.d.ts +0 -15
  85. package/dist/src/generators/federate-module/schema.json +0 -89
  86. package/dist/src/generators/host/files/common/src/app/__fileName__.js__tmpl__ +0 -40
  87. package/dist/src/generators/host/files/common/src/main.js__tmpl__ +0 -13
  88. package/dist/src/generators/host/files/common/tsconfig.lint.json__tmpl__ +0 -19
  89. package/dist/src/generators/host/files/common-ts/src/app/__fileName__.tsx__tmpl__ +0 -41
  90. package/dist/src/generators/host/files/common-ts/src/main.ts__tmpl__ +0 -13
  91. package/dist/src/generators/host/files/rspack-common/src/app/__fileName__.jsx__tmpl__ +0 -42
  92. package/dist/src/generators/host/files/rspack-common/src/main.jsx__tmpl__ +0 -13
  93. package/dist/src/generators/host/files/rspack-common/tsconfig.lint.json__tmpl__ +0 -19
  94. package/dist/src/generators/host/files/rspack-module-federation/module-federation.config.js__tmpl__ +0 -24
  95. package/dist/src/generators/host/files/rspack-module-federation/rspack.config.js__tmpl__ +0 -42
  96. package/dist/src/generators/host/files/rspack-module-federation/rspack.config.prod.js__tmpl__ +0 -66
  97. package/dist/src/generators/host/files/rspack-module-federation-ssr/module-federation.server.config.js__tmpl__ +0 -27
  98. package/dist/src/generators/host/files/rspack-module-federation-ssr/rspack.config.js__tmpl__ +0 -68
  99. package/dist/src/generators/host/files/rspack-module-federation-ssr/server.ts__tmpl__ +0 -28
  100. package/dist/src/generators/host/files/rspack-module-federation-ssr/src/main.server.tsx__tmpl__ +0 -49
  101. package/dist/src/generators/host/files/rspack-module-federation-ssr/tsconfig.server.json__tmpl__ +0 -17
  102. package/dist/src/generators/host/files/rspack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +0 -22
  103. package/dist/src/generators/host/files/rspack-module-federation-ssr-ts/rspack.config.ts__tmpl__ +0 -68
  104. package/dist/src/generators/host/files/rspack-module-federation-ssr-ts/server.ts__tmpl__ +0 -28
  105. package/dist/src/generators/host/files/rspack-module-federation-ssr-ts/src/main.server.tsx__tmpl__ +0 -49
  106. package/dist/src/generators/host/files/rspack-module-federation-ssr-ts/tsconfig.server.json__tmpl__ +0 -17
  107. package/dist/src/generators/host/files/rspack-module-federation-ts/module-federation.config.ts__tmpl__ +0 -28
  108. package/dist/src/generators/host/files/rspack-module-federation-ts/rspack.config.prod.ts__tmpl__ +0 -67
  109. package/dist/src/generators/host/files/rspack-module-federation-ts/rspack.config.ts__tmpl__ +0 -42
  110. package/dist/src/generators/host/files/webpack-module-federation/module-federation.config.js__tmpl__ +0 -24
  111. package/dist/src/generators/host/files/webpack-module-federation/webpack.config.js__tmpl__ +0 -17
  112. package/dist/src/generators/host/files/webpack-module-federation/webpack.config.prod.js__tmpl__ +0 -39
  113. package/dist/src/generators/host/files/webpack-module-federation-ssr/module-federation.server.config.js__tmpl__ +0 -19
  114. package/dist/src/generators/host/files/webpack-module-federation-ssr/server.ts__tmpl__ +0 -28
  115. package/dist/src/generators/host/files/webpack-module-federation-ssr/tsconfig.server.json__tmpl__ +0 -17
  116. package/dist/src/generators/host/files/webpack-module-federation-ssr/webpack.server.config.js__tmpl__ +0 -17
  117. package/dist/src/generators/host/files/webpack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +0 -16
  118. package/dist/src/generators/host/files/webpack-module-federation-ssr-ts/server.ts__tmpl__ +0 -28
  119. package/dist/src/generators/host/files/webpack-module-federation-ssr-ts/tsconfig.server.json__tmpl__ +0 -17
  120. package/dist/src/generators/host/files/webpack-module-federation-ssr-ts/webpack.server.config.ts__tmpl__ +0 -17
  121. package/dist/src/generators/host/files/webpack-module-federation-ts/module-federation.config.ts__tmpl__ +0 -28
  122. package/dist/src/generators/host/files/webpack-module-federation-ts/webpack.config.prod.ts__tmpl__ +0 -40
  123. package/dist/src/generators/host/files/webpack-module-federation-ts/webpack.config.ts__tmpl__ +0 -18
  124. package/dist/src/generators/host/host.d.ts +0 -4
  125. package/dist/src/generators/host/host.js +0 -174
  126. package/dist/src/generators/host/lib/add-module-federation-files.d.ts +0 -6
  127. package/dist/src/generators/host/lib/add-module-federation-files.js +0 -92
  128. package/dist/src/generators/host/lib/normalize-host-name.d.ts +0 -2
  129. package/dist/src/generators/host/lib/normalize-host-name.js +0 -12
  130. package/dist/src/generators/host/lib/setup-ssr-for-host.d.ts +0 -6
  131. package/dist/src/generators/host/lib/setup-ssr-for-host.js +0 -59
  132. package/dist/src/generators/host/lib/update-module-federation-e2e-project.d.ts +0 -3
  133. package/dist/src/generators/host/lib/update-module-federation-e2e-project.js +0 -19
  134. package/dist/src/generators/host/lib/update-module-federation-tsconfig.d.ts +0 -3
  135. package/dist/src/generators/host/lib/update-module-federation-tsconfig.js +0 -34
  136. package/dist/src/generators/host/schema.d.ts +0 -44
  137. package/dist/src/generators/host/schema.json +0 -173
  138. package/dist/src/generators/remote/files/common/src/main.js__tmpl__ +0 -1
  139. package/dist/src/generators/remote/files/common/src/remote-entry.js__tmpl__ +0 -1
  140. package/dist/src/generators/remote/files/common-ts/src/main.ts__tmpl__ +0 -1
  141. package/dist/src/generators/remote/files/common-ts/src/remote-entry.ts__tmpl__ +0 -1
  142. package/dist/src/generators/remote/files/rspack-common/src/main.jsx__tmpl__ +0 -1
  143. package/dist/src/generators/remote/files/rspack-common/src/remote-entry.js__tmpl__ +0 -1
  144. package/dist/src/generators/remote/files/rspack-module-federation/module-federation.config.js__tmpl__ +0 -12
  145. package/dist/src/generators/remote/files/rspack-module-federation/rspack.config.js__tmpl__ +0 -45
  146. package/dist/src/generators/remote/files/rspack-module-federation/rspack.config.prod.js__tmpl__ +0 -1
  147. package/dist/src/generators/remote/files/rspack-module-federation-ssr/module-federation.server.config.js__tmpl__ +0 -15
  148. package/dist/src/generators/remote/files/rspack-module-federation-ssr/rspack.config.js__tmpl__ +0 -71
  149. package/dist/src/generators/remote/files/rspack-module-federation-ssr/server.ts__tmpl__ +0 -45
  150. package/dist/src/generators/remote/files/rspack-module-federation-ssr/src/main.server.tsx__tmpl__ +0 -45
  151. package/dist/src/generators/remote/files/rspack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +0 -19
  152. package/dist/src/generators/remote/files/rspack-module-federation-ssr-ts/rspack.config.ts__tmpl__ +0 -71
  153. package/dist/src/generators/remote/files/rspack-module-federation-ssr-ts/server.ts__tmpl__ +0 -45
  154. package/dist/src/generators/remote/files/rspack-module-federation-ssr-ts/src/main.server.tsx__tmpl__ +0 -45
  155. package/dist/src/generators/remote/files/rspack-module-federation-ssr-ts/tsconfig.lint.json__tmpl__ +0 -19
  156. package/dist/src/generators/remote/files/rspack-module-federation-ts/module-federation.config.ts__tmpl__ +0 -16
  157. package/dist/src/generators/remote/files/rspack-module-federation-ts/rspack.config.prod.ts__tmpl__ +0 -1
  158. package/dist/src/generators/remote/files/rspack-module-federation-ts/rspack.config.ts__tmpl__ +0 -45
  159. package/dist/src/generators/remote/files/rspack-module-federation-ts/tsconfig.lint.json__tmpl__ +0 -19
  160. package/dist/src/generators/remote/files/webpack-module-federation/module-federation.config.js__tmpl__ +0 -12
  161. package/dist/src/generators/remote/files/webpack-module-federation/webpack.config.js__tmpl__ +0 -17
  162. package/dist/src/generators/remote/files/webpack-module-federation/webpack.config.prod.js__tmpl__ +0 -1
  163. package/dist/src/generators/remote/files/webpack-module-federation-ssr/module-federation.server.config.js__tmpl__ +0 -9
  164. package/dist/src/generators/remote/files/webpack-module-federation-ssr/server.ts__tmpl__ +0 -45
  165. package/dist/src/generators/remote/files/webpack-module-federation-ssr/webpack.server.config.js__tmpl__ +0 -17
  166. package/dist/src/generators/remote/files/webpack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +0 -13
  167. package/dist/src/generators/remote/files/webpack-module-federation-ssr-ts/server.ts__tmpl__ +0 -45
  168. package/dist/src/generators/remote/files/webpack-module-federation-ssr-ts/tsconfig.lint.json__tmpl__ +0 -19
  169. package/dist/src/generators/remote/files/webpack-module-federation-ssr-ts/webpack.server.config.ts__tmpl__ +0 -17
  170. package/dist/src/generators/remote/files/webpack-module-federation-ts/module-federation.config.ts__tmpl__ +0 -16
  171. package/dist/src/generators/remote/files/webpack-module-federation-ts/tsconfig.lint.json__tmpl__ +0 -19
  172. package/dist/src/generators/remote/files/webpack-module-federation-ts/webpack.config.prod.ts__tmpl__ +0 -1
  173. package/dist/src/generators/remote/files/webpack-module-federation-ts/webpack.config.ts__tmpl__ +0 -17
  174. package/dist/src/generators/remote/lib/add-remote-to-dynamic-host.d.ts +0 -2
  175. package/dist/src/generators/remote/lib/add-remote-to-dynamic-host.js +0 -12
  176. package/dist/src/generators/remote/lib/setup-package-json-exports-for-remote.d.ts +0 -3
  177. package/dist/src/generators/remote/lib/setup-package-json-exports-for-remote.js +0 -30
  178. package/dist/src/generators/remote/lib/setup-ssr-for-remote.d.ts +0 -4
  179. package/dist/src/generators/remote/lib/setup-ssr-for-remote.js +0 -61
  180. package/dist/src/generators/remote/lib/setup-tspath-for-remote.d.ts +0 -3
  181. package/dist/src/generators/remote/lib/setup-tspath-for-remote.js +0 -14
  182. package/dist/src/generators/remote/lib/update-host-with-remote.d.ts +0 -2
  183. package/dist/src/generators/remote/lib/update-host-with-remote.js +0 -79
  184. package/dist/src/generators/remote/remote.d.ts +0 -6
  185. package/dist/src/generators/remote/remote.js +0 -201
  186. package/dist/src/generators/remote/schema.d.ts +0 -39
  187. package/dist/src/generators/remote/schema.json +0 -173
  188. package/dist/src/generators/setup-ssr/files/server.ts__tmpl__ +0 -28
  189. package/dist/src/generators/setup-ssr/files/src/main.server.tsx__tmpl__ +0 -47
  190. package/dist/src/generators/setup-ssr/files/tsconfig.server.json__tmpl__ +0 -17
  191. package/dist/src/generators/setup-ssr/schema.d.ts +0 -8
  192. package/dist/src/generators/setup-ssr/schema.json +0 -54
  193. package/dist/src/generators/setup-ssr/setup-ssr.d.ts +0 -4
  194. package/dist/src/generators/setup-ssr/setup-ssr.js +0 -198
  195. package/dist/src/module-federation/ast-utils.d.ts +0 -8
  196. package/dist/src/module-federation/ast-utils.js +0 -101
  197. package/dist/src/rules/update-module-federation-project.d.ts +0 -11
  198. package/dist/src/rules/update-module-federation-project.js +0 -72
  199. package/dist/src/utils/add-mf-env-to-inputs.d.ts +0 -2
  200. package/dist/src/utils/add-mf-env-to-inputs.js +0 -29
  201. package/dist/src/utils/module-federation-deprecation.d.ts +0 -12
  202. package/dist/src/utils/module-federation-deprecation.js +0 -46
  203. package/dist/src/utils/normalize-remote.d.ts +0 -8
  204. package/dist/src/utils/normalize-remote.js +0 -31
package/dist/index.d.ts CHANGED
@@ -10,8 +10,6 @@ export { reactInitGenerator } from './src/generators/init/init';
10
10
  export { reduxGenerator } from './src/generators/redux/redux';
11
11
  export { storiesGenerator } from './src/generators/stories/stories';
12
12
  export { storybookConfigurationGenerator } from './src/generators/storybook-configuration/configuration';
13
- export { hostGenerator } from './src/generators/host/host';
14
- export { remoteGenerator } from './src/generators/remote/remote';
15
13
  export { cypressComponentConfigGenerator } from './src/generators/cypress-component-configuration/cypress-component-configuration';
16
14
  export { componentTestGenerator } from './src/generators/component-test/component-test';
17
15
  export type { SupportedStyles } from './typings/style';
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.componentTestGenerator = exports.cypressComponentConfigGenerator = exports.remoteGenerator = exports.hostGenerator = exports.storybookConfigurationGenerator = exports.storiesGenerator = exports.reduxGenerator = exports.reactInitGenerator = exports.libraryGenerator = exports.componentStoryGenerator = exports.hookGenerator = exports.componentGenerator = exports.applicationGenerator = exports.reactVersion = exports.reactDomVersion = exports.assertValidStyle = exports.extendReactEslintJson = exports.extraEslintDependencies = void 0;
3
+ exports.componentTestGenerator = exports.cypressComponentConfigGenerator = exports.storybookConfigurationGenerator = exports.storiesGenerator = exports.reduxGenerator = exports.reactInitGenerator = exports.libraryGenerator = exports.componentStoryGenerator = exports.hookGenerator = exports.componentGenerator = exports.applicationGenerator = exports.reactVersion = exports.reactDomVersion = exports.assertValidStyle = exports.extendReactEslintJson = exports.extraEslintDependencies = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  var lint_1 = require("./src/utils/lint");
6
6
  Object.defineProperty(exports, "extraEslintDependencies", { enumerable: true, get: function () { return lint_1.extraEslintDependencies; } });
@@ -28,10 +28,6 @@ var stories_1 = require("./src/generators/stories/stories");
28
28
  Object.defineProperty(exports, "storiesGenerator", { enumerable: true, get: function () { return stories_1.storiesGenerator; } });
29
29
  var configuration_1 = require("./src/generators/storybook-configuration/configuration");
30
30
  Object.defineProperty(exports, "storybookConfigurationGenerator", { enumerable: true, get: function () { return configuration_1.storybookConfigurationGenerator; } });
31
- var host_1 = require("./src/generators/host/host");
32
- Object.defineProperty(exports, "hostGenerator", { enumerable: true, get: function () { return host_1.hostGenerator; } });
33
- var remote_1 = require("./src/generators/remote/remote");
34
- Object.defineProperty(exports, "remoteGenerator", { enumerable: true, get: function () { return remote_1.remoteGenerator; } });
35
31
  var cypress_component_configuration_1 = require("./src/generators/cypress-component-configuration/cypress-component-configuration");
36
32
  Object.defineProperty(exports, "cypressComponentConfigGenerator", { enumerable: true, get: function () { return cypress_component_configuration_1.cypressComponentConfigGenerator; } });
37
33
  var component_test_1 = require("./src/generators/component-test/component-test");
@@ -6,3 +6,4 @@ export { suppressReactComposeHelperWarnings } from './src/utils/deprecation';
6
6
  export { hasWebpackPlugin } from './src/utils/has-webpack-plugin';
7
7
  export { getReactDependenciesVersionsToInstall, isReact18, } from './src/utils/version-utils';
8
8
  export { testingLibraryDomVersion, testingLibraryReactVersion, babelCoreVersion, babelPresetReactVersion, } from './src/utils/versions';
9
+ export { applyReactConfig } from './plugins/nx-react-webpack-plugin/lib/apply-react-config';
package/dist/internal.js CHANGED
@@ -5,7 +5,7 @@
5
5
  // internal consumers and may change without semver protection. Mirrors
6
6
  // `@nx/devkit/internal`.
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.babelPresetReactVersion = exports.babelCoreVersion = exports.testingLibraryReactVersion = exports.testingLibraryDomVersion = exports.isReact18 = exports.getReactDependenciesVersionsToInstall = exports.hasWebpackPlugin = exports.suppressReactComposeHelperWarnings = exports.isComponent = exports.assertPackageIsInstalled = exports.addRollupBuildTarget = exports.addE2e = void 0;
8
+ exports.applyReactConfig = exports.babelPresetReactVersion = exports.babelCoreVersion = exports.testingLibraryReactVersion = exports.testingLibraryDomVersion = exports.isReact18 = exports.getReactDependenciesVersionsToInstall = exports.hasWebpackPlugin = exports.suppressReactComposeHelperWarnings = exports.isComponent = exports.assertPackageIsInstalled = exports.addRollupBuildTarget = exports.addE2e = void 0;
9
9
  var add_e2e_1 = require("./src/generators/application/lib/add-e2e");
10
10
  Object.defineProperty(exports, "addE2e", { enumerable: true, get: function () { return add_e2e_1.addE2e; } });
11
11
  var add_rollup_build_target_1 = require("./src/generators/library/lib/add-rollup-build-target");
@@ -26,3 +26,5 @@ Object.defineProperty(exports, "testingLibraryDomVersion", { enumerable: true, g
26
26
  Object.defineProperty(exports, "testingLibraryReactVersion", { enumerable: true, get: function () { return versions_1.testingLibraryReactVersion; } });
27
27
  Object.defineProperty(exports, "babelCoreVersion", { enumerable: true, get: function () { return versions_1.babelCoreVersion; } });
28
28
  Object.defineProperty(exports, "babelPresetReactVersion", { enumerable: true, get: function () { return versions_1.babelPresetReactVersion; } });
29
+ var apply_react_config_1 = require("./plugins/nx-react-webpack-plugin/lib/apply-react-config");
30
+ Object.defineProperty(exports, "applyReactConfig", { enumerable: true, get: function () { return apply_react_config_1.applyReactConfig; } });
@@ -4,9 +4,11 @@ exports.nxComponentTestingPreset = nxComponentTestingPreset;
4
4
  const cypress_preset_1 = require("@nx/cypress/plugins/cypress-preset");
5
5
  const internal_1 = require("@nx/cypress/internal");
6
6
  const devkit_1 = require("@nx/devkit");
7
- const internal_2 = require("@nx/js/internal");
7
+ const internal_2 = require("@nx/devkit/internal");
8
+ const internal_3 = require("@nx/js/internal");
8
9
  const fs_1 = require("fs");
9
10
  const path_1 = require("path");
11
+ const url_1 = require("url");
10
12
  /**
11
13
  * React nx preset for Cypress Component Testing
12
14
  *
@@ -34,7 +36,10 @@ function nxComponentTestingPreset(pathToConfig, options) {
34
36
  // options, cast to any to avoid type errors
35
37
  return basePresetSettings;
36
38
  }
37
- const normalizedProjectRootPath = ['.ts', '.js'].some((ext) => pathToConfig.endsWith(ext))
39
+ pathToConfig = pathToConfig.startsWith('file://')
40
+ ? (0, url_1.fileURLToPath)(pathToConfig)
41
+ : pathToConfig;
42
+ const normalizedProjectRootPath = (0, fs_1.statSync)(pathToConfig).isDirectory()
38
43
  ? pathToConfig
39
44
  : (0, path_1.dirname)(pathToConfig);
40
45
  if (options?.bundler === 'vite') {
@@ -154,51 +159,105 @@ function buildTargetWebpack(ctx, buildTarget, componentTestingProjectName) {
154
159
  Has component config? ${!!ctProjectConfig}
155
160
  `);
156
161
  }
162
+ const buildConfig = buildableProjectConfig.targets[parsed.target];
163
+ if (buildConfig.metadata?.technologies?.includes('webpack')) {
164
+ return async () => {
165
+ const configPath = ['js', 'cjs', 'mjs', 'ts', 'cts', 'mts']
166
+ .map((ext) => (0, path_1.join)(devkit_1.workspaceRoot, buildableProjectConfig.root, `webpack.config.${ext}`))
167
+ .find((path) => (0, fs_1.existsSync)(path));
168
+ if (!configPath)
169
+ throw new Error(`Cannot find webpack config for ${buildTarget}`);
170
+ const previousBuildTarget = process.env.NX_BUILD_TARGET;
171
+ process.env.NX_BUILD_TARGET = buildTarget;
172
+ try {
173
+ const exported = await (0, internal_2.loadConfigFile)(configPath);
174
+ const config = typeof exported === 'function'
175
+ ? await exported({}, { mode: 'development' })
176
+ : exported;
177
+ // Cypress runs its own dev server; the app's port and history
178
+ // fallback would collide with it and replace its spec page.
179
+ const { devServer: _devServer, ...ctConfig } = config;
180
+ return ctConfig;
181
+ }
182
+ finally {
183
+ if (previousBuildTarget === undefined)
184
+ delete process.env.NX_BUILD_TARGET;
185
+ else
186
+ process.env.NX_BUILD_TARGET = previousBuildTarget;
187
+ }
188
+ };
189
+ }
157
190
  if (buildableProjectConfig.targets[parsed.target].executor !==
158
191
  '@nx/webpack:webpack' &&
159
192
  buildableProjectConfig.targets[parsed.target].executor !==
160
193
  '@nx/rspack:rspack') {
161
- throw new InvalidExecutorError(`The '${parsed.target}' target of the '${parsed.project}' project is not using the '@nx/webpack:webpack' or '@nx/rspack:rspack' executor. ` +
162
- `Please make sure to use '@nx/webpack:webpack' or '@nx/rspack:rspack' executor in that target to use Cypress Component Testing.`);
194
+ throw new InvalidExecutorError(`The '${parsed.target}' target of the '${parsed.project}' project is not a Webpack build target. ` +
195
+ `Cypress Component Testing needs a build target inferred by '@nx/webpack/plugin'.`);
196
+ }
197
+ const context = (0, internal_1.createExecutorContext)(graph, buildableProjectConfig.targets, parsed.project, parsed.target, parsed.configuration);
198
+ const { resolveUserDefinedWebpackConfig, webpackExecutorContext, } = require('@nx/webpack/internal');
199
+ const { normalizeOptions } = require('@nx/webpack');
200
+ const options = normalizeOptions(withSchemaDefaults(parsed, context), devkit_1.workspaceRoot, buildableProjectConfig.root, (0, internal_3.getProjectSourceRoot)(buildableProjectConfig));
201
+ if (!options.webpackConfig) {
202
+ return null;
163
203
  }
164
- const context = (0, internal_1.createExecutorContext)(graph, buildableProjectConfig.targets, parsed.project, parsed.target, parsed.target);
165
- const { resolveUserDefinedWebpackConfig } = require('@nx/webpack/internal');
166
- const { normalizeOptions, composePluginsSync, withNx, withWeb, } = require('@nx/webpack');
167
- const options = normalizeOptions(withSchemaDefaults(parsed, context), devkit_1.workspaceRoot, buildableProjectConfig.root, (0, internal_2.getProjectSourceRoot)(buildableProjectConfig));
168
- let customWebpack;
169
- if (options.webpackConfig) {
170
- customWebpack = resolveUserDefinedWebpackConfig(options.webpackConfig, options.tsConfig.startsWith(context.root)
204
+ return () => webpackExecutorContext.run({
205
+ target: parsed,
206
+ options: {
207
+ ...options,
208
+ // Cypress supplies component-index.html and builds library sources.
209
+ generateIndexHtml: false,
210
+ extractLicenses: false,
211
+ },
212
+ }, async () => {
213
+ const customWebpack = await resolveUserDefinedWebpackConfig(options.webpackConfig, options.tsConfig.startsWith(context.root)
171
214
  ? options.tsConfig
172
215
  : (0, path_1.join)(context.root, options.tsConfig));
173
- }
174
- return async () => {
175
- customWebpack = await customWebpack;
176
- // For legacy `composePlugins(...)` setup, we need change some options to make Cypress CT work properly.
216
+ // Unmigrated `composePlugins(...)` configs are inert, so CT uses its fallback config.
177
217
  if (customWebpack &&
178
218
  require('@nx/webpack').isNxWebpackComposablePlugin(customWebpack) // using inline since @nx/webpack may not be installed when using vite so top-level import would error
179
219
  ) {
180
- return await customWebpack({}, {
181
- options: {
182
- ...options,
183
- // cypress will generate its own index.html from component-index.html
184
- generateIndexHtml: false,
185
- // causes issues with buildable libraries with ENOENT: no such file or directory, scandir error
186
- extractLicenses: false,
187
- root: devkit_1.workspaceRoot,
188
- projectRoot: ctProjectConfig.root,
189
- sourceRoot: (0, internal_2.getProjectSourceRoot)(ctProjectConfig),
190
- },
191
- context,
192
- configuration: parsed.configuration,
220
+ const { buildBaseWebpackConfig } = require('./webpack-fallback');
221
+ return buildBaseWebpackConfig({
222
+ tsConfigPath: findTsConfig((0, path_1.join)(devkit_1.workspaceRoot, ctProjectConfig.root)),
223
+ compiler: options.compiler || 'babel',
193
224
  });
194
225
  }
195
226
  else if (typeof customWebpack === 'object' ||
196
227
  typeof customWebpack === 'function') {
197
- // If this is a standard webpack config object or function, just return. it
198
- return customWebpack;
228
+ const config = typeof customWebpack === 'function'
229
+ ? await customWebpack({}, { mode: 'development' })
230
+ : customWebpack;
231
+ const { NxAppWebpackPlugin, } = require('@nx/webpack/app-plugin');
232
+ config.plugins = config.plugins?.map((plugin) => plugin instanceof NxAppWebpackPlugin
233
+ ? {
234
+ apply(compiler) {
235
+ // Cypress installs its harness after this config is returned.
236
+ const entry = { ...compiler.options.entry };
237
+ const output = { ...compiler.options.output };
238
+ const devtool = compiler.options.devtool;
239
+ const optimization = {
240
+ ...compiler.options.optimization,
241
+ };
242
+ const mode = compiler.options.mode;
243
+ const watchOptions = compiler.options.watchOptions;
244
+ const context = compiler.options.context;
245
+ plugin.apply(compiler);
246
+ compiler.options.entry = entry;
247
+ compiler.options.output = output;
248
+ compiler.options.devtool = devtool;
249
+ compiler.options.optimization = optimization;
250
+ compiler.options.mode = mode;
251
+ compiler.options.watchOptions = watchOptions;
252
+ compiler.options.context = context;
253
+ compiler.context = context;
254
+ },
255
+ }
256
+ : plugin);
257
+ return config;
199
258
  }
200
- return null; // return null to use fallback config
201
- };
259
+ return null;
260
+ });
202
261
  }
203
262
  function findViteConfig(projectRootFullPath) {
204
263
  const allowsExt = ['js', 'mjs', 'ts', 'cjs', 'mts', 'cts'];
@@ -216,7 +275,7 @@ function findTsConfig(projectRoot) {
216
275
  ];
217
276
  for (const config of potentialConfigs) {
218
277
  if ((0, fs_1.existsSync)((0, path_1.join)(projectRoot, config))) {
219
- return config;
278
+ return (0, path_1.join)(projectRoot, config);
220
279
  }
221
280
  }
222
281
  }
@@ -3,13 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.webpack = exports.core = void 0;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const internal_1 = require("@nx/js/internal");
6
- const webpack_1 = require("@nx/webpack");
7
6
  const internal_2 = require("@nx/webpack/internal");
8
7
  const fs_1 = require("fs");
9
8
  const path_1 = require("path");
10
- const webpack_2 = require("webpack");
11
- const with_react_1 = require("../with-react");
12
- const deprecation_1 = require("../../src/utils/deprecation");
9
+ const webpack_1 = require("webpack");
10
+ const apply_react_config_1 = require("../nx-react-webpack-plugin/lib/apply-react-config");
13
11
  const merge_plugins_1 = require("./merge-plugins");
14
12
  // This is shamelessly taken from CRA and modified for NX use
15
13
  // https://github.com/facebook/create-react-app/blob/4784997f0682e75eb32a897b4ffe34d735912e6c/packages/react-scripts/config/env.js#L71
@@ -120,7 +118,6 @@ const webpack = async (storybookWebpackConfig = {}, options) => {
120
118
  catch {
121
119
  throw new Error(`'@nx/webpack' package is not installed. Install it and try again.`);
122
120
  }
123
- const { withNx, withWeb } = require('@nx/webpack');
124
121
  const projectData = await getProjectData(options);
125
122
  const tsconfigPath = (0, fs_1.existsSync)((0, path_1.join)(projectData.projectRoot, 'tsconfig.storybook.json'))
126
123
  ? (0, path_1.join)(projectData.projectRoot, 'tsconfig.storybook.json')
@@ -141,18 +138,21 @@ const webpack = async (storybookWebpackConfig = {}, options) => {
141
138
  extractCss: storybookWebpackConfig.mode === 'production',
142
139
  target: 'web',
143
140
  };
144
- // ESM build for modern browsers.
145
- let baseWebpackConfig = {};
146
- // Nx composes these helpers internally for the storybook preset; suppress
147
- // their deprecation warning so it fires only for user-authored configs.
148
- const finalConfig = (0, internal_2.suppressWebpackComposeHelperWarnings)(() => (0, deprecation_1.suppressReactComposeHelperWarnings)(() => {
149
- const configure = (0, webpack_1.composePluginsSync)(withNx({ target: 'web', skipTypeChecking: true }), (0, with_react_1.withReact)());
150
- return configure(baseWebpackConfig, {
151
- options: builderOptions,
152
- // TODO(JamesHenry): replace as any type assertion with as ExecutorContext once the nx repo is updated to use https://github.com/nrwl/nx/pull/33095
153
- context: { root: devkit_1.workspaceRoot }, // The context is not used here.
154
- });
155
- }));
141
+ const finalConfig = {};
142
+ const configOptions = {
143
+ ...builderOptions,
144
+ projectName: undefined,
145
+ targetName: undefined,
146
+ configurationName: undefined,
147
+ projectGraph: undefined,
148
+ };
149
+ (0, internal_2.applyBaseConfig)({
150
+ ...configOptions,
151
+ assets: builderOptions.assets ?? [],
152
+ skipTypeChecking: true,
153
+ }, finalConfig);
154
+ (0, internal_2.applyWebConfig)(configOptions, finalConfig);
155
+ (0, apply_react_config_1.applyReactConfig)({}, finalConfig);
156
156
  return {
157
157
  ...storybookWebpackConfig,
158
158
  module: {
@@ -176,7 +176,7 @@ const webpack = async (storybookWebpackConfig = {}, options) => {
176
176
  []), ...(finalConfig.resolve
177
177
  .plugins ?? [])),
178
178
  },
179
- plugins: (0, merge_plugins_1.mergePlugins)(new webpack_2.DefinePlugin(getClientEnvironment(storybookWebpackConfig.mode).stringified), ...(storybookWebpackConfig.plugins ?? []), ...(finalConfig.plugins ?? [])),
179
+ plugins: (0, merge_plugins_1.mergePlugins)(new webpack_1.DefinePlugin(getClientEnvironment(storybookWebpackConfig.mode).stringified), ...(storybookWebpackConfig.plugins ?? []), ...(finalConfig.plugins ?? [])),
180
180
  };
181
181
  };
182
182
  exports.webpack = webpack;
@@ -3,11 +3,7 @@ import type { NxWebpackExecutionContext, WithWebOptions } from '@nx/webpack';
3
3
  export interface WithReactOptions extends WithWebOptions {
4
4
  }
5
5
  /**
6
- * @deprecated Will be removed in Nx v24. Use `NxReactWebpackPlugin` from
7
- * `@nx/react/webpack-plugin` in a standard webpack config and run
8
- * `nx g @nx/webpack:convert-to-inferred`. See
9
- * https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.
10
- * @param {WithReactOptions} pluginOptions
11
- * @returns {NxWebpackPlugin}
6
+ * @deprecated Use `NxReactWebpackPlugin` from `@nx/react/webpack-plugin`.
7
+ * This inert stub will be removed in Nx v25.
12
8
  */
13
- export declare function withReact(pluginOptions?: WithReactOptions): (config: Configuration, context: NxWebpackExecutionContext) => Configuration;
9
+ export declare function withReact(_options?: WithReactOptions): (config: Configuration, _context?: NxWebpackExecutionContext) => Configuration;
@@ -1,27 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.withReact = withReact;
4
- const apply_react_config_1 = require("./nx-react-webpack-plugin/lib/apply-react-config");
5
4
  const deprecation_1 = require("../src/utils/deprecation");
6
- const processed = new Set();
5
+ // TODO(v25): remove the inert config-helper stubs in this file.
7
6
  /**
8
- * @deprecated Will be removed in Nx v24. Use `NxReactWebpackPlugin` from
9
- * `@nx/react/webpack-plugin` in a standard webpack config and run
10
- * `nx g @nx/webpack:convert-to-inferred`. See
11
- * https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.
12
- * @param {WithReactOptions} pluginOptions
13
- * @returns {NxWebpackPlugin}
7
+ * @deprecated Use `NxReactWebpackPlugin` from `@nx/react/webpack-plugin`.
8
+ * This inert stub will be removed in Nx v25.
14
9
  */
15
- function withReact(pluginOptions = {}) {
10
+ function withReact(_options = {}) {
16
11
  (0, deprecation_1.warnReactWithReactDeprecation)();
17
- return function configure(config, context) {
18
- const { withWeb } = require('@nx/webpack');
19
- if (processed.has(config))
20
- return config;
21
- // Apply web config for CSS, JSX, index.html handling, etc.
22
- config = withWeb(pluginOptions)(config, context);
23
- (0, apply_react_config_1.applyReactConfig)({}, config);
24
- processed.add(config);
25
- return config;
26
- };
12
+ return (config, _context) => config;
27
13
  }
@@ -26,7 +26,6 @@ const add_rsbuild_1 = require("./lib/bundlers/add-rsbuild");
26
26
  const add_vite_1 = require("./lib/bundlers/add-vite");
27
27
  async function applicationGenerator(tree, schema) {
28
28
  return await applicationGeneratorInternal(tree, {
29
- addPlugin: false,
30
29
  useProjectJson: true,
31
30
  ...schema,
32
31
  });
@@ -34,7 +33,7 @@ async function applicationGenerator(tree, schema) {
34
33
  async function applicationGeneratorInternal(tree, schema) {
35
34
  (0, assert_supported_react_version_1.assertSupportedReactVersion)(tree);
36
35
  const tasks = [];
37
- const addTsPlugin = (0, internal_2.shouldConfigureTsSolutionSetup)(tree, schema.addPlugin, schema.useTsSolution);
36
+ const addTsPlugin = (0, internal_2.shouldConfigureTsSolutionSetup)(tree, schema.useTsSolution);
38
37
  const jsInitTask = await (0, js_1.initGenerator)(tree, {
39
38
  ...schema,
40
39
  tsConfigName: schema.rootProject ? 'tsconfig.json' : 'tsconfig.base.json',
@@ -59,25 +58,6 @@ async function applicationGeneratorInternal(tree, schema) {
59
58
  useReactRouterPlugin: options.useReactRouter,
60
59
  });
61
60
  tasks.push(initTask);
62
- if (!options.addPlugin) {
63
- const nxJson = (0, devkit_1.readNxJson)(tree) ?? {};
64
- const existing = findBuildDefault(nxJson.targetDefaults);
65
- if (!existing) {
66
- (0, internal_1.upsertTargetDefault)(tree, nxJson, {
67
- target: 'build',
68
- cache: true,
69
- dependsOn: ['^build'],
70
- });
71
- (0, devkit_1.updateNxJson)(tree, nxJson);
72
- }
73
- else if (!existing.dependsOn) {
74
- (0, internal_1.upsertTargetDefault)(tree, nxJson, {
75
- target: 'build',
76
- dependsOn: ['^build'],
77
- });
78
- (0, devkit_1.updateNxJson)(tree, nxJson);
79
- }
80
- }
81
61
  if (options.bundler === 'webpack') {
82
62
  await (0, add_webpack_1.initWebpack)(tree, options, tasks);
83
63
  }
@@ -160,19 +140,4 @@ async function applicationGeneratorInternal(tree, schema) {
160
140
  });
161
141
  return (0, devkit_1.runTasksInSerial)(...tasks);
162
142
  }
163
- function findBuildDefault(td) {
164
- if (!td)
165
- return undefined;
166
- const value = td['build'];
167
- if (value === undefined)
168
- return undefined;
169
- if (Array.isArray(value)) {
170
- const found = value.find((e) => e.filter === undefined);
171
- if (!found)
172
- return undefined;
173
- const { filter: _f, ...rest } = found;
174
- return rest;
175
- }
176
- return value;
177
- }
178
143
  exports.default = applicationGenerator;
@@ -1,4 +1,3 @@
1
- <%_ if (rspackPluginOptions) { _%>
2
1
  const { NxAppRspackPlugin } = require('@nx/rspack/app-plugin');
3
2
  const { NxReactRspackPlugin } = require('@nx/rspack/react-plugin');
4
3
  const { join } = require('path');
@@ -26,28 +25,6 @@ module.exports = {
26
25
  outputHashing: process.env['NODE_ENV'] === 'production' ? 'all' : 'none',
27
26
  optimization: process.env['NODE_ENV'] === 'production',
28
27
  }),
29
- new NxReactRspackPlugin({
30
- // Uncomment this line if you don't want to use SVGR
31
- // See: https://react-svgr.com/
32
- // svgr: false
33
- }),
28
+ new NxReactRspackPlugin(),
34
29
  ],
35
30
  };
36
- <%_ } else { _%>
37
- const { composePlugins, withNx, withReact } = require('@nx/rspack');
38
-
39
- // Nx plugins for rspack.
40
- module.exports = composePlugins(
41
- withNx(),
42
- withReact({
43
- // Uncomment this line if you don't want to use SVGR
44
- // See: https://react-svgr.com/
45
- // svgr: false
46
- }),
47
- (config) => {
48
- // Update the rspack config as needed here.
49
- // e.g. `config.plugins.push(new MyPlugin())`
50
- return config;
51
- }
52
- );
53
- <%_ } _%>
@@ -1,4 +1,3 @@
1
- <%_ if (webpackPluginOptions) { _%>
2
1
  const { NxAppWebpackPlugin } = require('@nx/webpack/app-plugin');
3
2
  const { NxReactWebpackPlugin } = require('@nx/react/webpack-plugin');
4
3
  const { join } = require('path');
@@ -28,30 +27,6 @@ module.exports = {
28
27
  outputHashing: process.env['NODE_ENV'] === 'production' ? 'all' : 'none',
29
28
  optimization: process.env['NODE_ENV'] === 'production',
30
29
  }),
31
- new NxReactWebpackPlugin({
32
- // Uncomment this line if you don't want to use SVGR
33
- // See: https://react-svgr.com/
34
- // svgr: false
35
- }),
30
+ new NxReactWebpackPlugin(),
36
31
  ],
37
32
  };
38
- <%_ } else { _%>
39
- const { composePlugins, withNx } = require('@nx/webpack');
40
- const { withReact } = require('@nx/react');
41
-
42
- // Nx plugins for webpack.
43
- module.exports = composePlugins(
44
- withNx(),
45
- withReact({
46
- // Uncomment this line if you don't want to use SVGR
47
- // See: https://react-svgr.com/
48
- // svgr: false
49
- }),
50
- (config) => {
51
- // Update the webpack config as needed here.
52
- // e.g. `config.plugins.push(new MyPlugin())`
53
- config.output.clean = true;
54
- return config;
55
- }
56
- );
57
- <%_ } _%>
@@ -24,26 +24,26 @@ async function addE2e(tree, options) {
24
24
  };
25
25
  if (options.bundler === 'webpack') {
26
26
  const { getWebpackE2EWebServerInfo } = (0, devkit_1.ensurePackage)('@nx/webpack', versions_1.nxVersion);
27
- e2eWebServerInfo = await getWebpackE2EWebServerInfo(tree, options.projectName, (0, devkit_1.joinPathFragments)(options.appProjectRoot, `webpack.config.${options.js ? 'js' : 'ts'}`), options.addPlugin, options.port);
27
+ e2eWebServerInfo = await getWebpackE2EWebServerInfo(tree, options.projectName, (0, devkit_1.joinPathFragments)(options.appProjectRoot, `webpack.config.${options.js ? 'js' : 'ts'}`), options.port);
28
28
  }
29
29
  else if (options.bundler === 'rspack') {
30
30
  const { getRspackE2EWebServerInfo } = (0, devkit_1.ensurePackage)('@nx/rspack', versions_1.nxVersion);
31
- e2eWebServerInfo = await getRspackE2EWebServerInfo(tree, options.projectName, (0, devkit_1.joinPathFragments)(options.appProjectRoot, `rspack.config.${options.js ? 'js' : 'ts'}`), options.addPlugin, options.port);
31
+ e2eWebServerInfo = await getRspackE2EWebServerInfo(tree, options.projectName, (0, devkit_1.joinPathFragments)(options.appProjectRoot, `rspack.config.${options.js ? 'js' : 'ts'}`), options.port);
32
32
  }
33
33
  else if (options.bundler === 'vite') {
34
34
  const { getViteE2EWebServerInfo, getReactRouterE2EWebServerInfo } = (0, devkit_1.ensurePackage)('@nx/vite', versions_1.nxVersion);
35
35
  e2eWebServerInfo = options.useReactRouter
36
- ? await getReactRouterE2EWebServerInfo(tree, options.projectName, (0, devkit_1.joinPathFragments)(options.appProjectRoot, `vite.config.${options.js ? 'js' : 'ts'}`), options.addPlugin, options.port ?? 4200,
36
+ ? await getReactRouterE2EWebServerInfo(tree, options.projectName, (0, devkit_1.joinPathFragments)(options.appProjectRoot, `vite.config.${options.js ? 'js' : 'ts'}`), options.port ?? 4200,
37
37
  // If the user manually sets the port, then use it for dev and preview
38
38
  options.port)
39
- : await getViteE2EWebServerInfo(tree, options.projectName, (0, devkit_1.joinPathFragments)(options.appProjectRoot, `vite.config.${options.js ? 'js' : 'ts'}`), options.addPlugin, options.port ?? 4200,
39
+ : await getViteE2EWebServerInfo(tree, options.projectName, (0, devkit_1.joinPathFragments)(options.appProjectRoot, `vite.config.${options.js ? 'js' : 'ts'}`), options.port ?? 4200,
40
40
  // If the user manually sets the port, then use it for dev and preview
41
41
  options.port);
42
42
  }
43
43
  else if (options.bundler === 'rsbuild') {
44
44
  (0, devkit_1.ensurePackage)('@nx/rsbuild', versions_1.nxVersion);
45
45
  const { getRsbuildE2EWebServerInfo, } = require('@nx/rsbuild/config-utils');
46
- e2eWebServerInfo = await getRsbuildE2EWebServerInfo(tree, options.projectName, (0, devkit_1.joinPathFragments)(options.appProjectRoot, `rsbuild.config.${options.js ? 'js' : 'ts'}`), options.addPlugin, options.port ?? 4200);
46
+ e2eWebServerInfo = await getRsbuildE2EWebServerInfo(tree, options.projectName, (0, devkit_1.joinPathFragments)(options.appProjectRoot, `rsbuild.config.${options.js ? 'js' : 'ts'}`), options.port ?? 4200);
47
47
  }
48
48
  if (!hasNxBuildPlugin) {
49
49
  await (0, web_1.webStaticServeGenerator)(tree, {
@@ -141,7 +141,6 @@ async function addE2e(tree, options) {
141
141
  webServerCommand: e2eWebServerInfo.e2eCiWebServerCommand,
142
142
  webServerAddress: e2eWebServerInfo.e2eCiBaseUrl,
143
143
  rootProject: options.rootProject,
144
- addPlugin: options.addPlugin,
145
144
  });
146
145
  return e2eTask;
147
146
  }
@@ -22,7 +22,6 @@ async function addLinting(host, options) {
22
22
  rootProject: options.rootProject,
23
23
  skipPackageJson: options.skipPackageJson,
24
24
  enableTypedLinting: (0, internal_1.isTypedLintingEnabled)(options),
25
- addPlugin: options.addPlugin,
26
25
  }));
27
26
  // Predefined configs, `extends` and ignore entries are ESLint concepts with
28
27
  // no equivalent in other linters.