Skip to content

Update/nx 23#1919

Open
gestj wants to merge 4 commits into
rx-angular:mainfrom
gestj:update/nx-23
Open

Update/nx 23#1919
gestj wants to merge 4 commits into
rx-angular:mainfrom
gestj:update/nx-23

Conversation

@gestj

@gestj gestj commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Migrates the workspace to Nx 23.0.1 (from 22.3.3) via nx migrate — bumps all @nx/* packages, Angular 21.2.9, jest 30, cypress 15.18; runs the 27 codemods (nx.json eslint inputs, ignore-file entries, jest-30 snapshot header URLs).

Fix included

rebundle-demo:build broke:
Directory import '.../libs/rebundle/src/core' is not supported resolving ES modules imported from .../libs/rebundle/src/index.ts

@angular/build 21.2 (via Nx 23) now loads custom builder plugins as native ESM. The demo resolved @rx-angular/rebundle through the tsconfig path to the TS source, whose directory/extensionless imports throw ERR_UNSUPPORTED_DIR_IMPORT under native ESM — it only worked before because the plugin loaded as CommonJS (directory require is valid there).
Fix: point the demo plugin entry at the compiled CJS output (dist/libs/rebundle) + dependsOn: ["^build"] so the lib builds first.

Verification (local)

format:check ✅ · lint (12) ✅ · test (58) ✅ · build (12) ✅ · component-test (58) ✅ · e2e rebundle-demo ✅ · docs build ✅

NX migration and others added 2 commits July 6, 2026 13:42
Bumps all @nx/* packages and nx to 23.0.1, Angular to 21.2.9, jest 30,
cypress 15.18. Applies 27 nx codemods (nx.json eslint inputs, ignore
files, jest-30 snapshot header URLs).
@angular/build 21.2 (Nx 23) loads custom builder `plugins` as native
ESM. The plugin was resolved via tsconfig path to the TS source, whose
directory/extensionless imports throw ERR_UNSUPPORTED_DIR_IMPORT under
native ESM (it only worked before because it loaded as CJS). Point the
plugin at the compiled CJS output (dist/libs/rebundle) and add
dependsOn ^build so the lib is built first.

Generated by Claude claude-opus-4-8[1m]
@github-actions github-actions Bot added </> Template @rx-angular/template related { } State @rx-angular/state related 🛠️ CDK CDK related labels Jul 6, 2026
@nx-cloud

nx-cloud Bot commented Jul 6, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 66528c5

Command Status Duration Result
nx affected -t lint build test component-test e... ✅ Succeeded 2m 22s View ↗
nx build docs ✅ Succeeded 1m 13s View ↗
nx build demos --configuration=production ✅ Succeeded 23s View ↗
nx-cloud record -- npx nx format:check ✅ Succeeded <1s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-07-07 10:45:14 UTC

@gestj gestj mentioned this pull request Jul 6, 2026
@CarinaGaspar

Copy link
Copy Markdown

@gestj did you use the NX V23.1.0.beta to test the Angular 22 support? I was looking and the official version that will support Angular 22 is NX V23.1.0.
Thanks!

@gestj

gestj commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

@gestj did you use the NX V23.1.0.beta to test the Angular 22 support? I was looking and the official version that will support Angular 22 is NX V23.1.0. Thanks!

No, I didn't. My approach is always small steps.

If NX 23.1.0 is out faster than this MR merged (& it really supports Angular 22), I might redo this thing here.

Claude via GestJ added 2 commits July 7, 2026 12:34
The demo build loads the rebundle plugin from its compiled output
(dist/libs/rebundle/src/index.js). Only the `build` target declared
`dependsOn: ^build`, so `serve` (dev) and `e2e` (via serve:production)
ran without the lib built. On a fresh checkout — and on distributed
Nx Cloud agents, where the dist is not replayed unless it is a task-graph
dependency — plugin resolution failed with
"Cannot find module 'dist/libs/rebundle/src/index.js'", breaking CI e2e.

Add the missing build edges: `^build` on serve, `rebundle:build` on e2e.

Generated by Claude claude-opus-4-8[1m]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🛠️ CDK CDK related { } State @rx-angular/state related </> Template @rx-angular/template related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants