@nx/angular 22.0.0-beta.8 → 22.0.0-beta.9
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/angular",
|
|
3
|
-
"version": "22.0.0-beta.
|
|
3
|
+
"version": "22.0.0-beta.9",
|
|
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": {
|
|
@@ -58,14 +58,14 @@
|
|
|
58
58
|
"migrations": "./migrations.json"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@nx/devkit": "22.0.0-beta.
|
|
62
|
-
"@nx/eslint": "22.0.0-beta.
|
|
63
|
-
"@nx/js": "22.0.0-beta.
|
|
64
|
-
"@nx/module-federation": "22.0.0-beta.
|
|
65
|
-
"@nx/rspack": "22.0.0-beta.
|
|
66
|
-
"@nx/web": "22.0.0-beta.
|
|
67
|
-
"@nx/webpack": "22.0.0-beta.
|
|
68
|
-
"@nx/workspace": "22.0.0-beta.
|
|
61
|
+
"@nx/devkit": "22.0.0-beta.9",
|
|
62
|
+
"@nx/eslint": "22.0.0-beta.9",
|
|
63
|
+
"@nx/js": "22.0.0-beta.9",
|
|
64
|
+
"@nx/module-federation": "22.0.0-beta.9",
|
|
65
|
+
"@nx/rspack": "22.0.0-beta.9",
|
|
66
|
+
"@nx/web": "22.0.0-beta.9",
|
|
67
|
+
"@nx/webpack": "22.0.0-beta.9",
|
|
68
|
+
"@nx/workspace": "22.0.0-beta.9",
|
|
69
69
|
"@phenomnomnominal/tsquery": "~5.0.1",
|
|
70
70
|
"@typescript-eslint/type-utils": "^8.0.0",
|
|
71
71
|
"enquirer": "~2.3.6",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convert-to-rspack.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/convert-to-rspack/convert-to-rspack.ts"],"names":[],"mappings":"AAAA,OAAO,EAcL,KAAK,iBAAiB,EAEtB,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAapB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AA6StD,wBAAsB,eAAe,CACnC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"convert-to-rspack.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/convert-to-rspack/convert-to-rspack.ts"],"names":[],"mappings":"AAAA,OAAO,EAcL,KAAK,iBAAiB,EAEtB,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAapB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AA6StD,wBAAsB,eAAe,CACnC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,qBAAqB,8BAuZ9B;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -255,6 +255,7 @@ async function convertToRspack(tree, schema) {
|
|
|
255
255
|
throw new Error('Angular Rspack requires Angular 19 or higher. Please upgrade your Angular version before converting to Rspack.');
|
|
256
256
|
}
|
|
257
257
|
let projectServePort = DEFAULT_PORT;
|
|
258
|
+
const projectServeConfigurationOptions = {};
|
|
258
259
|
for (const [targetName, target] of Object.entries(project.targets)) {
|
|
259
260
|
if (target.executor === '@angular-devkit/build-angular:browser' ||
|
|
260
261
|
target.executor === '@nx/angular:webpack-browser') {
|
|
@@ -290,6 +291,11 @@ async function convertToRspack(tree, schema) {
|
|
|
290
291
|
configurationOptions[configurationName] ??= {};
|
|
291
292
|
configurationOptions[configurationName].devServer ??= {};
|
|
292
293
|
handleDevServerTargetOptions(tree, configuration, configurationOptions[configurationName].devServer, project.root);
|
|
294
|
+
if (configuration.port && configuration.port !== DEFAULT_PORT) {
|
|
295
|
+
projectServeConfigurationOptions[configurationName] ??= {};
|
|
296
|
+
projectServeConfigurationOptions[configurationName].port =
|
|
297
|
+
configuration.port;
|
|
298
|
+
}
|
|
293
299
|
}
|
|
294
300
|
}
|
|
295
301
|
serveTarget = { name: targetName, config: target };
|
|
@@ -482,6 +488,12 @@ async function convertToRspack(tree, schema) {
|
|
|
482
488
|
serveTarget.config.options = {};
|
|
483
489
|
serveTarget.config.options.port = projectServePort;
|
|
484
490
|
}
|
|
491
|
+
if (Object.keys(projectServeConfigurationOptions).length > 0) {
|
|
492
|
+
serveTarget.config.configurations = {};
|
|
493
|
+
for (const [configurationName, options] of Object.entries(projectServeConfigurationOptions)) {
|
|
494
|
+
serveTarget.config.configurations[configurationName] = options;
|
|
495
|
+
}
|
|
496
|
+
}
|
|
485
497
|
if (Object.keys(serveTarget.config).length) {
|
|
486
498
|
// there's extra target metadata left that wouldn't be inferred, we keep it
|
|
487
499
|
project.targets[inferredServeTargetName] = serveTarget.config;
|