@nx/angular 21.0.0-canary.20250206-8bd0bcd → 21.0.0-canary.20250416-caa26a7

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 (76) hide show
  1. package/generators.json +5 -0
  2. package/migrations.json +181 -0
  3. package/ng-package.json +1 -1
  4. package/package.json +11 -9
  5. package/src/builders/dev-server/dev-server.impl.js +2 -3
  6. package/src/builders/dev-server/lib/normalize-options.js +1 -0
  7. package/src/builders/dev-server/schema.d.ts +1 -0
  8. package/src/builders/dev-server/schema.json +8 -3
  9. package/src/builders/webpack-browser/schema.d.ts +3 -1
  10. package/src/builders/webpack-browser/schema.json +5 -0
  11. package/src/builders/webpack-browser/webpack-browser.impl.js +3 -2
  12. package/src/executors/delegate-build/delegate-build.impl.d.ts +1 -3
  13. package/src/executors/delegate-build/delegate-build.impl.js +0 -3
  14. package/src/executors/package/package.impl.js +1 -4
  15. package/src/generators/add-linting/add-linting.js +1 -16
  16. package/src/generators/add-linting/schema.d.ts +1 -0
  17. package/src/generators/application/application.js +14 -1
  18. package/src/generators/application/lib/add-e2e.js +2 -2
  19. package/src/generators/application/lib/add-linting.js +1 -0
  20. package/src/generators/application/lib/add-serve-static-target.js +1 -0
  21. package/src/generators/application/lib/add-unit-test-runner.js +2 -0
  22. package/src/generators/application/lib/create-project.js +1 -0
  23. package/src/generators/application/lib/normalize-options.d.ts +1 -1
  24. package/src/generators/application/lib/normalize-options.js +9 -2
  25. package/src/generators/application/schema.d.ts +2 -2
  26. package/src/generators/application/schema.json +1 -7
  27. package/src/generators/component-test/component-test.js +1 -1
  28. package/src/generators/convert-to-rspack/convert-to-rspack.d.ts +4 -0
  29. package/src/generators/convert-to-rspack/convert-to-rspack.js +319 -0
  30. package/src/generators/convert-to-rspack/lib/create-config.d.ts +2 -0
  31. package/src/generators/convert-to-rspack/lib/create-config.js +48 -0
  32. package/src/generators/convert-to-rspack/lib/get-custom-webpack-config.d.ts +6 -0
  33. package/src/generators/convert-to-rspack/lib/get-custom-webpack-config.js +75 -0
  34. package/src/generators/convert-to-rspack/lib/update-tsconfig.d.ts +2 -0
  35. package/src/generators/convert-to-rspack/lib/update-tsconfig.js +26 -0
  36. package/src/generators/convert-to-rspack/lib/validate-supported-executor.d.ts +2 -0
  37. package/src/generators/convert-to-rspack/lib/validate-supported-executor.js +14 -0
  38. package/src/generators/convert-to-rspack/schema.d.ts +5 -0
  39. package/src/generators/convert-to-rspack/schema.json +30 -0
  40. package/src/generators/host/host.js +1 -1
  41. package/src/generators/host/schema.d.ts +0 -1
  42. package/src/generators/host/schema.json +0 -6
  43. package/src/generators/library/lib/add-project.d.ts +1 -1
  44. package/src/generators/library/lib/add-project.js +7 -1
  45. package/src/generators/library/lib/normalize-options.js +1 -1
  46. package/src/generators/library/lib/normalized-schema.d.ts +0 -1
  47. package/src/generators/library/library.js +5 -1
  48. package/src/generators/library/schema.d.ts +0 -1
  49. package/src/generators/library/schema.json +0 -6
  50. package/src/generators/ng-add/migrators/projects/e2e.migrator.js +2 -2
  51. package/src/generators/ngrx-feature-store/schema.d.ts +1 -1
  52. package/src/generators/remote/remote.js +1 -1
  53. package/src/generators/remote/schema.d.ts +0 -1
  54. package/src/generators/remote/schema.json +0 -6
  55. package/src/generators/setup-mf/lib/setup-serve-target.js +1 -0
  56. package/src/generators/setup-ssr/files/v19+/application-builder/ngmodule-src/app/__rootModuleFileName__ +2 -2
  57. package/src/generators/setup-ssr/files/v19+/application-builder/server/__serverFileName__ +1 -1
  58. package/src/generators/setup-ssr/files/v19+/application-builder/standalone-src/app/app.config.server.ts__tpl__ +2 -2
  59. package/src/generators/setup-ssr/files/v19+/application-builder-common-engine/server/__serverFileName__ +2 -0
  60. package/src/generators/setup-ssr/lib/generate-files.js +12 -1
  61. package/src/generators/setup-ssr/lib/update-project-config.js +1 -0
  62. package/src/generators/stories/stories.js +2 -2
  63. package/src/generators/utils/add-jest.d.ts +1 -0
  64. package/src/generators/utils/add-jest.js +2 -2
  65. package/src/generators/utils/add-vitest.d.ts +1 -0
  66. package/src/generators/utils/add-vitest.js +1 -1
  67. package/src/generators/utils/ensure-angular-dependencies.js +0 -1
  68. package/src/migrations/update-19-6-0/turn-off-dts-by-default.js +2 -2
  69. package/src/migrations/update-20-5-0/update-angular-cli.d.ts +3 -0
  70. package/src/migrations/update-20-5-0/update-angular-cli.js +23 -0
  71. package/src/migrations/update-21-0-0/set-continuous-option.d.ts +3 -0
  72. package/src/migrations/update-21-0-0/set-continuous-option.js +29 -0
  73. package/src/plugins/plugin.js +2 -0
  74. package/src/utils/backward-compatible-versions.js +2 -0
  75. package/src/utils/versions.d.ts +7 -6
  76. package/src/utils/versions.js +8 -7
package/generators.json CHANGED
@@ -38,6 +38,11 @@
38
38
  "schema": "./src/generators/convert-to-application-executor/schema.json",
39
39
  "description": "Converts projects to use the `@nx/angular:application` executor or the `@angular-devkit/build-angular:application` builder."
40
40
  },
41
+ "convert-to-rspack": {
42
+ "factory": "./src/generators/convert-to-rspack/convert-to-rspack",
43
+ "schema": "./src/generators/convert-to-rspack/schema.json",
44
+ "description": "Converts Angular Webpack projects to use Rspack."
45
+ },
41
46
  "directive": {
42
47
  "factory": "./src/generators/directive/directive",
43
48
  "schema": "./src/generators/directive/schema.json",
package/migrations.json CHANGED
@@ -347,6 +347,21 @@
347
347
  },
348
348
  "description": "Update the @angular/cli package version to ~19.1.0.",
349
349
  "factory": "./src/migrations/update-20-4-0/update-angular-cli"
350
+ },
351
+ "update-angular-cli-version-19-2-0": {
352
+ "cli": "nx",
353
+ "version": "20.5.0-beta.5",
354
+ "requires": {
355
+ "@angular/core": ">=19.2.0"
356
+ },
357
+ "description": "Update the @angular/cli package version to ~19.2.0.",
358
+ "factory": "./src/migrations/update-20-5-0/update-angular-cli"
359
+ },
360
+ "set-continuous-option": {
361
+ "cli": "nx",
362
+ "version": "21.0.0-beta.3",
363
+ "description": "Set the `continuous` option to `true` for continuous tasks.",
364
+ "factory": "./src/migrations/update-21-0-0/set-continuous-option"
350
365
  }
351
366
  },
352
367
  "packageJsonUpdates": {
@@ -1049,6 +1064,22 @@
1049
1064
  "@angular-eslint/utils": {
1050
1065
  "version": "^18.0.1",
1051
1066
  "alwaysAddToPackageJson": false
1067
+ },
1068
+ "@angular-eslint/schematics": {
1069
+ "version": "^18.0.1",
1070
+ "alwaysAddToPackageJson": false
1071
+ },
1072
+ "@angular-eslint/test-utils": {
1073
+ "version": "^18.0.1",
1074
+ "alwaysAddToPackageJson": false
1075
+ },
1076
+ "@angular-eslint/builder": {
1077
+ "version": "^18.0.1",
1078
+ "alwaysAddToPackageJson": false
1079
+ },
1080
+ "@angular-eslint/bundled-angular-compiler": {
1081
+ "version": "^18.0.1",
1082
+ "alwaysAddToPackageJson": false
1052
1083
  }
1053
1084
  }
1054
1085
  },
@@ -1316,6 +1347,10 @@
1316
1347
  "version": "~19.0.0",
1317
1348
  "alwaysAddToPackageJson": false
1318
1349
  },
1350
+ "@angular/google-maps": {
1351
+ "version": "~19.0.0",
1352
+ "alwaysAddToPackageJson": false
1353
+ },
1319
1354
  "ng-packagr": {
1320
1355
  "version": "~19.0.0",
1321
1356
  "alwaysAddToPackageJson": false
@@ -1368,6 +1403,22 @@
1368
1403
  "@angular-eslint/utils": {
1369
1404
  "version": "^19.0.0",
1370
1405
  "alwaysAddToPackageJson": false
1406
+ },
1407
+ "@angular-eslint/schematics": {
1408
+ "version": "^19.0.0",
1409
+ "alwaysAddToPackageJson": false
1410
+ },
1411
+ "@angular-eslint/test-utils": {
1412
+ "version": "^19.0.0",
1413
+ "alwaysAddToPackageJson": false
1414
+ },
1415
+ "@angular-eslint/builder": {
1416
+ "version": "^19.0.0",
1417
+ "alwaysAddToPackageJson": false
1418
+ },
1419
+ "@angular-eslint/bundled-angular-compiler": {
1420
+ "version": "^19.0.0",
1421
+ "alwaysAddToPackageJson": false
1371
1422
  }
1372
1423
  }
1373
1424
  },
@@ -1410,6 +1461,22 @@
1410
1461
  "@angular-eslint/utils": {
1411
1462
  "version": "^19.0.2",
1412
1463
  "alwaysAddToPackageJson": false
1464
+ },
1465
+ "@angular-eslint/schematics": {
1466
+ "version": "^19.0.2",
1467
+ "alwaysAddToPackageJson": false
1468
+ },
1469
+ "@angular-eslint/test-utils": {
1470
+ "version": "^19.0.2",
1471
+ "alwaysAddToPackageJson": false
1472
+ },
1473
+ "@angular-eslint/builder": {
1474
+ "version": "^19.0.2",
1475
+ "alwaysAddToPackageJson": false
1476
+ },
1477
+ "@angular-eslint/bundled-angular-compiler": {
1478
+ "version": "^19.0.2",
1479
+ "alwaysAddToPackageJson": false
1413
1480
  }
1414
1481
  }
1415
1482
  },
@@ -1480,11 +1547,125 @@
1480
1547
  "version": "~19.1.0",
1481
1548
  "alwaysAddToPackageJson": false
1482
1549
  },
1550
+ "@angular/google-maps": {
1551
+ "version": "~19.1.0",
1552
+ "alwaysAddToPackageJson": false
1553
+ },
1483
1554
  "ng-packagr": {
1484
1555
  "version": "~19.1.0",
1485
1556
  "alwaysAddToPackageJson": false
1486
1557
  }
1487
1558
  }
1559
+ },
1560
+ "20.5.0": {
1561
+ "version": "20.5.0-beta.5",
1562
+ "x-prompt": "Do you want to update the Angular version to v19.2?",
1563
+ "requires": {
1564
+ "@angular/core": ">=19.1.0 <19.2.0"
1565
+ },
1566
+ "packages": {
1567
+ "@angular-devkit/build-angular": {
1568
+ "version": "~19.2.0",
1569
+ "alwaysAddToPackageJson": false
1570
+ },
1571
+ "@angular-devkit/core": {
1572
+ "version": "~19.2.0",
1573
+ "alwaysAddToPackageJson": false
1574
+ },
1575
+ "@angular-devkit/schematics": {
1576
+ "version": "~19.2.0",
1577
+ "alwaysAddToPackageJson": false
1578
+ },
1579
+ "@angular/build": {
1580
+ "version": "~19.2.0",
1581
+ "alwaysAddToPackageJson": false
1582
+ },
1583
+ "@angular/pwa": {
1584
+ "version": "~19.2.0",
1585
+ "alwaysAddToPackageJson": false
1586
+ },
1587
+ "@angular/ssr": {
1588
+ "version": "~19.2.0",
1589
+ "alwaysAddToPackageJson": false
1590
+ },
1591
+ "@schematics/angular": {
1592
+ "version": "~19.2.0",
1593
+ "alwaysAddToPackageJson": false
1594
+ },
1595
+ "@angular-devkit/architect": {
1596
+ "version": "~0.1902.0",
1597
+ "alwaysAddToPackageJson": false
1598
+ },
1599
+ "@angular-devkit/build-webpack": {
1600
+ "version": "~0.1902.0",
1601
+ "alwaysAddToPackageJson": false
1602
+ },
1603
+ "@angular/core": {
1604
+ "version": "~19.2.0",
1605
+ "alwaysAddToPackageJson": true
1606
+ },
1607
+ "@angular/material": {
1608
+ "version": "~19.2.1",
1609
+ "alwaysAddToPackageJson": false
1610
+ },
1611
+ "@angular/cdk": {
1612
+ "version": "~19.2.1",
1613
+ "alwaysAddToPackageJson": false
1614
+ },
1615
+ "@angular/google-maps": {
1616
+ "version": "~19.2.1",
1617
+ "alwaysAddToPackageJson": false
1618
+ },
1619
+ "ng-packagr": {
1620
+ "version": "~19.2.0",
1621
+ "alwaysAddToPackageJson": false
1622
+ }
1623
+ }
1624
+ },
1625
+ "20.5.0-angular-eslint": {
1626
+ "version": "20.5.0-rc.1",
1627
+ "requires": {
1628
+ "eslint": "^8.57.0 || ^9.0.0",
1629
+ "@angular/core": ">= 19.0.0 < 20.0.0"
1630
+ },
1631
+ "packages": {
1632
+ "angular-eslint": {
1633
+ "version": "^19.2.0",
1634
+ "alwaysAddToPackageJson": false
1635
+ },
1636
+ "@angular-eslint/eslint-plugin": {
1637
+ "version": "^19.2.0",
1638
+ "alwaysAddToPackageJson": false
1639
+ },
1640
+ "@angular-eslint/eslint-plugin-template": {
1641
+ "version": "^19.2.0",
1642
+ "alwaysAddToPackageJson": false
1643
+ },
1644
+ "@angular-eslint/template-parser": {
1645
+ "version": "^19.2.0",
1646
+ "alwaysAddToPackageJson": false
1647
+ },
1648
+ "@angular-eslint/utils": {
1649
+ "version": "^19.2.0",
1650
+ "alwaysAddToPackageJson": false
1651
+ },
1652
+ "@angular-eslint/schematics": {
1653
+ "version": "^19.2.0",
1654
+ "alwaysAddToPackageJson": false
1655
+ },
1656
+ "@angular-eslint/test-utils": {
1657
+ "version": "^19.2.0",
1658
+ "alwaysAddToPackageJson": false
1659
+ },
1660
+ "@angular-eslint/builder": {
1661
+ "version": "^19.2.0",
1662
+ "alwaysAddToPackageJson": false
1663
+ },
1664
+ "@angular-eslint/bundled-angular-compiler": {
1665
+ "version": "^19.2.0",
1666
+ "alwaysAddToPackageJson": false
1667
+ }
1668
+ }
1488
1669
  }
1489
1670
  }
1490
1671
  }
package/ng-package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "@typescript-eslint/",
16
16
  "picocolors",
17
17
  "ignore",
18
- "minimatch",
18
+ "picomatch",
19
19
  "rxjs-for-await",
20
20
  "webpack-merge",
21
21
  "ts-node",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/angular",
3
- "version": "21.0.0-canary.20250206-8bd0bcd",
3
+ "version": "21.0.0-canary.20250416-caa26a7",
4
4
  "private": false,
5
5
  "description": "The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: \n\n- Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, Playwright and Cypress. \n\n- Generators to help scaffold code quickly (like: Micro Frontends, Libraries, both internal to your codebase and publishable to npm) \n\n- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.",
6
6
  "repository": {
@@ -65,19 +65,21 @@
65
65
  "dependencies": {
66
66
  "@phenomnomnominal/tsquery": "~5.0.1",
67
67
  "@typescript-eslint/type-utils": "^8.0.0",
68
+ "enquirer": "~2.3.6",
68
69
  "picocolors": "^1.1.0",
70
+ "picomatch": "4.0.2",
69
71
  "magic-string": "~0.30.2",
70
- "minimatch": "9.0.3",
71
72
  "semver": "^7.5.3",
72
73
  "tslib": "^2.3.0",
73
74
  "webpack-merge": "^5.8.0",
74
- "@nx/devkit": "21.0.0-canary.20250206-8bd0bcd",
75
- "@nx/js": "21.0.0-canary.20250206-8bd0bcd",
76
- "@nx/eslint": "21.0.0-canary.20250206-8bd0bcd",
77
- "@nx/webpack": "21.0.0-canary.20250206-8bd0bcd",
78
- "@nx/module-federation": "21.0.0-canary.20250206-8bd0bcd",
79
- "@nx/web": "21.0.0-canary.20250206-8bd0bcd",
80
- "@nx/workspace": "21.0.0-canary.20250206-8bd0bcd",
75
+ "@nx/devkit": "21.0.0-canary.20250416-caa26a7",
76
+ "@nx/js": "21.0.0-canary.20250416-caa26a7",
77
+ "@nx/eslint": "21.0.0-canary.20250416-caa26a7",
78
+ "@nx/webpack": "21.0.0-canary.20250416-caa26a7",
79
+ "@nx/rspack": "21.0.0-canary.20250416-caa26a7",
80
+ "@nx/module-federation": "21.0.0-canary.20250416-caa26a7",
81
+ "@nx/web": "21.0.0-canary.20250416-caa26a7",
82
+ "@nx/workspace": "21.0.0-canary.20250416-caa26a7",
81
83
  "piscina": "^4.4.0"
82
84
  },
83
85
  "peerDependencies": {
@@ -118,9 +118,7 @@ function executeDevServerBuilder(rawOptions, context) {
118
118
  // run the target for all projects.
119
119
  // This will occur when workspaceDependencies = []
120
120
  if (workspaceDependencies.length > 0) {
121
- baseWebpackConfig.plugins.push(
122
- // @ts-expect-error - difference between angular and webpack plugin definitions bc of webpack versions
123
- new webpack_nx_build_coordination_plugin_1.WebpackNxBuildCoordinationPlugin(`nx run-many --target=${parsedBuildTarget.target} --projects=${workspaceDependencies.join(',')}`));
121
+ baseWebpackConfig.plugins.push(new webpack_nx_build_coordination_plugin_1.WebpackNxBuildCoordinationPlugin(`nx run-many --target=${parsedBuildTarget.target} --projects=${workspaceDependencies.join(',')}`, { skipWatchingDeps: !options.watchDependencies }));
124
122
  }
125
123
  }
126
124
  if (!pathToWebpackConfig) {
@@ -151,6 +149,7 @@ function getDelegateBuilderOptions(options) {
151
149
  }
152
150
  // delete extra option not supported by the delegate builder
153
151
  delete delegateBuilderOptions.buildLibsFromSource;
152
+ delete delegateBuilderOptions.watchDependencies;
154
153
  return delegateBuilderOptions;
155
154
  }
156
155
  async function loadIndexHtmlFileTransformer(pathToIndexFileTransformer, tsConfig, context, isUsingWebpackBuilder) {
@@ -18,5 +18,6 @@ function normalizeOptions(schema) {
18
18
  hmr: schema.hmr ?? (angularMajorVersion < 19 ? false : undefined),
19
19
  open: schema.open ?? false,
20
20
  ssl: schema.ssl ?? false,
21
+ watchDependencies: schema.watchDependencies ?? true,
21
22
  };
22
23
  }
@@ -21,6 +21,7 @@ interface BaseSchema {
21
21
  prebundle?: boolean | { exclude: string[] };
22
22
  buildLibsFromSource?: boolean;
23
23
  esbuildMiddleware?: string[];
24
+ watchDependencies?: boolean;
24
25
  }
25
26
 
26
27
  export type SchemaWithBrowserTarget = BaseSchema & {
@@ -78,11 +78,11 @@
78
78
  },
79
79
  "publicHost": {
80
80
  "type": "string",
81
- "description": "The URL that the browser client (or live-reload client, if enabled) should use to connect to the development server. Use for a complex dev server setup, such as one with reverse proxies."
81
+ "description": "The URL that the browser client (or live-reload client, if enabled) should use to connect to the development server. Use for a complex dev server setup, such as one with reverse proxies. This option has no effect when using the 'application' or other esbuild-based builders."
82
82
  },
83
83
  "allowedHosts": {
84
84
  "type": "array",
85
- "description": "List of hosts that are allowed to access the dev server.",
85
+ "description": "List of hosts that are allowed to access the dev server. This option has no effect when using the 'application' or other esbuild-based builders in Angular versions lower than 19.2.0.",
86
86
  "default": [],
87
87
  "items": {
88
88
  "type": "string"
@@ -94,7 +94,7 @@
94
94
  },
95
95
  "disableHostCheck": {
96
96
  "type": "boolean",
97
- "description": "Don't verify connected clients are part of allowed hosts.",
97
+ "description": "Don't verify connected clients are part of allowed hosts. This option has no effect when using the 'application' or other esbuild-based builders in Angular versions lower than 19.2.0.",
98
98
  "default": false
99
99
  },
100
100
  "hmr": {
@@ -156,6 +156,11 @@
156
156
  "type": "string",
157
157
  "description": "The path to the middleware function. Relative to the workspace root."
158
158
  }
159
+ },
160
+ "watchDependencies": {
161
+ "type": "boolean",
162
+ "description": "Watch buildable dependencies and rebuild when they change.",
163
+ "default": true
159
164
  }
160
165
  },
161
166
  "additionalProperties": false,
@@ -6,8 +6,10 @@ export type BrowserBuilderSchema = Schema & {
6
6
  };
7
7
  indexHtmlTransformer?: string;
8
8
  buildLibsFromSource?: boolean;
9
+ watchDependencies?: boolean;
10
+
9
11
  /**
10
- * @deprecated Use `indexHtmlTransformer` instead. It will be removed in Nx 20.
12
+ * @deprecated Use `indexHtmlTransformer` instead. It will be removed in Nx 21.
11
13
  */
12
14
  indexFileTransformer?: string;
13
15
  };
@@ -464,6 +464,11 @@
464
464
  "type": "boolean",
465
465
  "description": "Read buildable libraries from source instead of building them separately.",
466
466
  "default": true
467
+ },
468
+ "watchDependencies": {
469
+ "type": "boolean",
470
+ "description": "Watch buildable dependencies and rebuild when they change.",
471
+ "default": true
467
472
  }
468
473
  },
469
474
  "additionalProperties": false,
@@ -25,7 +25,8 @@ function shouldSkipInitialTargetRun(projectGraph, project, target) {
25
25
  }
26
26
  function executeWebpackBrowserBuilder(options, context) {
27
27
  options.buildLibsFromSource ??= true;
28
- const { buildLibsFromSource, customWebpackConfig, indexHtmlTransformer, indexFileTransformer, ...delegateBuilderOptions } = options;
28
+ options.watchDependencies ??= true;
29
+ const { buildLibsFromSource, customWebpackConfig, indexHtmlTransformer, indexFileTransformer, watchDependencies, ...delegateBuilderOptions } = options;
29
30
  process.env.NX_BUILD_LIBS_FROM_SOURCE = `${buildLibsFromSource}`;
30
31
  process.env.NX_BUILD_TARGET = (0, devkit_1.targetToTargetString)({ ...context.target });
31
32
  const pathToWebpackConfig = customWebpackConfig?.path &&
@@ -61,7 +62,7 @@ function executeWebpackBrowserBuilder(options, context) {
61
62
  const skipInitialRun = shouldSkipInitialTargetRun(projectGraph, context.target.project, context.target.target);
62
63
  baseWebpackConfig.plugins.push(
63
64
  // @ts-expect-error - difference between angular and webpack plugin definitions bc of webpack versions
64
- new webpack_nx_build_coordination_plugin_1.WebpackNxBuildCoordinationPlugin(`nx run-many --target=${context.target.target} --projects=${workspaceDependencies.join(',')}`, skipInitialRun));
65
+ new webpack_nx_build_coordination_plugin_1.WebpackNxBuildCoordinationPlugin(`nx run-many --target=${context.target.target} --projects=${workspaceDependencies.join(',')}`, { skipInitialRun, skipWatchingDeps: !watchDependencies }));
65
66
  }
66
67
  }
67
68
  if (!pathToWebpackConfig) {
@@ -2,7 +2,5 @@ import type { ExecutorContext } from '@nx/devkit';
2
2
  import type { DelegateBuildExecutorSchema } from './schema';
3
3
  export declare function delegateBuildExecutor(options: DelegateBuildExecutorSchema, context: ExecutorContext): AsyncGenerator<{
4
4
  success: boolean;
5
- }, {
6
- success: boolean;
7
- }, any>;
5
+ }, void, any>;
8
6
  export default delegateBuildExecutor;
@@ -6,9 +6,6 @@ const buildable_libs_utils_1 = require("@nx/js/src/utils/buildable-libs-utils");
6
6
  async function* delegateBuildExecutor(options, context) {
7
7
  const { target, dependencies } = (0, buildable_libs_utils_1.calculateProjectBuildableDependencies)(context.taskGraph, context.projectGraph, context.root, context.projectName, context.targetName, context.configurationName);
8
8
  options.tsConfig = (0, buildable_libs_utils_1.createTmpTsConfig)((0, devkit_1.joinPathFragments)(context.root, options.tsConfig), context.root, target.data.root, dependencies);
9
- if (!(0, buildable_libs_utils_1.checkDependentProjectsHaveBeenBuilt)(context.root, context.projectName, context.targetName, dependencies)) {
10
- return { success: false };
11
- }
12
9
  const { buildTarget, ...targetOptions } = options;
13
10
  const delegateTarget = (0, devkit_1.parseTargetString)(buildTarget, context);
14
11
  yield* await (0, devkit_1.runExecutor)(delegateTarget, targetOptions, context);
@@ -31,10 +31,7 @@ function createLibraryExecutor(initializeNgPackagr) {
31
31
  if (angularMajorVersion < 18 && options.poll !== undefined) {
32
32
  throw new Error(`The "poll" option requires Angular version 18.0.0 or greater. You are currently using version ${angularVersion}.`);
33
33
  }
34
- const { target, dependencies, topLevelDependencies } = (0, buildable_libs_utils_1.calculateProjectBuildableDependencies)(context.taskGraph, context.projectGraph, context.root, context.projectName, context.targetName, context.configurationName);
35
- if (!(0, buildable_libs_utils_1.checkDependentProjectsHaveBeenBuilt)(context.root, context.projectName, context.targetName, dependencies)) {
36
- return Promise.resolve({ success: false });
37
- }
34
+ const { dependencies } = (0, buildable_libs_utils_1.calculateProjectBuildableDependencies)(context.taskGraph, context.projectGraph, context.root, context.projectName, context.targetName, context.configurationName);
38
35
  if (options.watch) {
39
36
  return yield* (0, rxjs_for_await_1.eachValueFrom)((0, rxjs_1.from)(initializeNgPackagr(options, context, dependencies)).pipe((0, operators_1.switchMap)((packagr) => packagr.watch()), (0, operators_1.mapTo)({ success: true })));
40
37
  }
@@ -22,7 +22,7 @@ async function addLintingGenerator(tree, options) {
22
22
  setParserOptionsProject: options.setParserOptionsProject,
23
23
  skipFormat: true,
24
24
  rootProject: rootProject,
25
- addPlugin: false,
25
+ addPlugin: options.addPlugin ?? false,
26
26
  addExplicitTargets: true,
27
27
  skipPackageJson: options.skipPackageJson,
28
28
  });
@@ -61,21 +61,6 @@ async function addLintingGenerator(tree, options) {
61
61
  files: ['*.html'],
62
62
  rules: {},
63
63
  });
64
- if ((0, buildable_project_1.isBuildableLibraryProject)(tree, options.projectName)) {
65
- (0, eslint_file_1.addOverrideToLintConfig)(tree, '', {
66
- files: ['*.json'],
67
- parser: 'jsonc-eslint-parser',
68
- rules: {
69
- '@nx/dependency-checks': [
70
- 'error',
71
- {
72
- // With flat configs, we don't want to include imports in the eslint js/cjs/mjs files to be checked
73
- ignoredFiles: ['{projectRoot}/eslint.config.{js,cjs,mjs}'],
74
- },
75
- ],
76
- },
77
- });
78
- }
79
64
  }
80
65
  else {
81
66
  (0, eslint_file_1.replaceOverridesInLintConfig)(tree, options.projectRoot, [
@@ -6,4 +6,5 @@ export interface AddLintingGeneratorSchema {
6
6
  skipFormat?: boolean;
7
7
  skipPackageJson?: boolean;
8
8
  unitTestRunner?: string;
9
+ addPlugin?: boolean;
9
10
  }
@@ -6,13 +6,18 @@ const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-projec
6
6
  const js_1 = require("@nx/js");
7
7
  const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
8
8
  const init_1 = require("../init/init");
9
+ const convert_to_rspack_1 = require("../convert-to-rspack/convert-to-rspack");
9
10
  const setup_ssr_1 = require("../setup-ssr/setup-ssr");
10
11
  const setup_tailwind_1 = require("../setup-tailwind/setup-tailwind");
11
12
  const ensure_angular_dependencies_1 = require("../utils/ensure-angular-dependencies");
12
13
  const lib_1 = require("./lib");
13
14
  async function applicationGenerator(tree, schema) {
14
15
  (0, ts_solution_setup_1.assertNotUsingTsSolutionSetup)(tree, 'angular', 'application');
15
- const options = await (0, lib_1.normalizeOptions)(tree, schema);
16
+ const isRspack = schema.bundler === 'rspack';
17
+ if (isRspack) {
18
+ schema.bundler = 'webpack';
19
+ }
20
+ const options = await (0, lib_1.normalizeOptions)(tree, schema, isRspack);
16
21
  const rootOffset = (0, devkit_1.offsetFromRoot)(options.appProjectRoot);
17
22
  await (0, js_1.initGenerator)(tree, {
18
23
  ...options,
@@ -23,6 +28,7 @@ async function applicationGenerator(tree, schema) {
23
28
  await (0, init_1.angularInitGenerator)(tree, {
24
29
  ...options,
25
30
  skipFormat: true,
31
+ addPlugin: options.addPlugin,
26
32
  });
27
33
  if (!options.skipPackageJson) {
28
34
  (0, ensure_angular_dependencies_1.ensureAngularDependencies)(tree);
@@ -64,6 +70,13 @@ async function applicationGenerator(tree, schema) {
64
70
  serverRouting: options.serverRouting,
65
71
  });
66
72
  }
73
+ if (isRspack) {
74
+ await (0, convert_to_rspack_1.convertToRspack)(tree, {
75
+ project: options.name,
76
+ skipInstall: options.skipPackageJson,
77
+ skipFormat: true,
78
+ });
79
+ }
67
80
  if (!options.skipFormat) {
68
81
  await (0, devkit_1.formatFiles)(tree);
69
82
  }
@@ -7,8 +7,8 @@ const target_defaults_utils_1 = require("@nx/devkit/src/generators/target-defaul
7
7
  async function addE2e(tree, options) {
8
8
  // since e2e are separate projects, default to adding plugins
9
9
  const nxJson = (0, devkit_1.readNxJson)(tree);
10
- const addPlugin = process.env.NX_ADD_PLUGINS !== 'false' &&
11
- nxJson.useInferencePlugins !== false;
10
+ const addPlugin = nxJson['useInferencePlugins'] !== false &&
11
+ process.env.NX_ADD_PLUGINS !== 'false';
12
12
  const e2eWebServerInfo = getAngularE2EWebServerInfo(tree, options.name, options.port);
13
13
  if (options.e2eTestRunner === 'cypress') {
14
14
  const { configurationGenerator } = (0, devkit_1.ensurePackage)('@nx/cypress', versions_1.nxVersion);
@@ -16,5 +16,6 @@ async function addLinting(host, options) {
16
16
  skipPackageJson: options.skipPackageJson,
17
17
  unitTestRunner: options.unitTestRunner,
18
18
  skipFormat: true,
19
+ addPlugin: options.addPlugin,
19
20
  });
20
21
  }
@@ -13,6 +13,7 @@ function addFileServerTarget(tree, options, targetName, e2ePort) {
13
13
  const isUsingApplicationBuilder = options.bundler === 'esbuild';
14
14
  const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, options.name);
15
15
  projectConfig.targets[targetName] = {
16
+ continuous: true,
16
17
  executor: '@nx/web:file-server',
17
18
  options: {
18
19
  buildTarget: `${options.name}:build`,
@@ -12,6 +12,7 @@ async function addUnitTestRunner(host, options) {
12
12
  projectRoot: options.appProjectRoot,
13
13
  skipPackageJson: options.skipPackageJson,
14
14
  strict: options.strict,
15
+ addPlugin: options.addPlugin,
15
16
  });
16
17
  break;
17
18
  case test_runners_1.UnitTestRunner.Vitest:
@@ -20,6 +21,7 @@ async function addUnitTestRunner(host, options) {
20
21
  projectRoot: options.appProjectRoot,
21
22
  skipPackageJson: options.skipPackageJson,
22
23
  strict: options.strict,
24
+ addPlugin: options.addPlugin,
23
25
  });
24
26
  break;
25
27
  }
@@ -82,6 +82,7 @@ function createProject(tree, options) {
82
82
  defaultConfiguration: 'production',
83
83
  },
84
84
  serve: {
85
+ continuous: true,
85
86
  executor: '@angular-devkit/build-angular:dev-server',
86
87
  options: options.port
87
88
  ? {
@@ -1,4 +1,4 @@
1
1
  import { type Tree } from '@nx/devkit';
2
2
  import type { Schema } from '../schema';
3
3
  import type { NormalizedSchema } from './normalized-schema';
4
- export declare function normalizeOptions(host: Tree, options: Partial<Schema>): Promise<NormalizedSchema>;
4
+ export declare function normalizeOptions(host: Tree, options: Partial<Schema>, isRspack?: boolean): Promise<NormalizedSchema>;
@@ -5,8 +5,13 @@ const devkit_1 = require("@nx/devkit");
5
5
  const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
6
6
  const eslint_1 = require("@nx/eslint");
7
7
  const test_runners_1 = require("../../../utils/test-runners");
8
- async function normalizeOptions(host, options) {
9
- await (0, project_name_and_root_utils_1.ensureProjectName)(host, options, 'application');
8
+ function arePluginsExplicitlyDisabled(host) {
9
+ const { useInferencePlugins } = (0, devkit_1.readNxJson)(host);
10
+ const addPluginEnvVar = process.env.NX_ADD_PLUGINS;
11
+ return useInferencePlugins === false || addPluginEnvVar === 'false';
12
+ }
13
+ async function normalizeOptions(host, options, isRspack) {
14
+ await (0, project_name_and_root_utils_1.ensureRootProjectName)(options, 'application');
10
15
  const { projectName: appProjectName, projectRoot: appProjectRoot } = await (0, project_name_and_root_utils_1.determineProjectNameAndRootOptions)(host, {
11
16
  name: options.name,
12
17
  projectType: 'application',
@@ -20,8 +25,10 @@ async function normalizeOptions(host, options) {
20
25
  ? options.tags.split(',').map((s) => s.trim())
21
26
  : [];
22
27
  const bundler = options.bundler ?? 'esbuild';
28
+ const addPlugin = options.addPlugin ?? (!arePluginsExplicitlyDisabled(host) && isRspack);
23
29
  // Set defaults and then overwrite with user options
24
30
  return {
31
+ addPlugin,
25
32
  style: 'css',
26
33
  routing: true,
27
34
  inlineStyle: false,
@@ -20,15 +20,15 @@ export interface Schema {
20
20
  e2eTestRunner?: E2eTestRunner;
21
21
  backendProject?: string;
22
22
  strict?: boolean;
23
- standaloneConfig?: boolean;
24
23
  port?: number;
25
24
  setParserOptionsProject?: boolean;
26
25
  skipPackageJson?: boolean;
27
26
  standalone?: boolean;
28
27
  rootProject?: boolean;
29
28
  minimal?: boolean;
30
- bundler?: 'webpack' | 'esbuild';
29
+ bundler?: 'webpack' | 'esbuild' | 'rspack';
31
30
  ssr?: boolean;
32
31
  serverRouting?: boolean;
33
32
  nxCloudToken?: string;
33
+ addPlugin?: boolean;
34
34
  }