Skip to content

chore: add libs/* to npm workspaces; clean CSS import path for examples#302

Merged
blove merged 1 commit into
mainfrom
libs-as-npm-workspaces
May 13, 2026
Merged

chore: add libs/* to npm workspaces; clean CSS import path for examples#302
blove merged 1 commit into
mainfrom
libs-as-npm-workspaces

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented May 13, 2026

Summary

Root `package.json` workspaces glob was `["packages/", "apps/"]` — `libs/` was missing, so `@ngaf/` libraries weren't symlinked into `node_modules`. TS imports still resolved via tsconfig `paths`, but esbuild's CSS resolver doesn't consult tsconfig — so the Stage 1 chat-timeline pilot ended up with a 5-level relative import for its `theme.css`.

Adding `libs/` to the workspaces glob and running `npm install` symlinks all 14 `@ngaf/` libs into `node_modules/@ngaf/`. The pilot's `styles.css` now uses the package import:

```css
@import "@ngaf/example-layouts/theme.css";
```

Stage 2 (remaining 31 Angular example apps) uses the clean path from day one — no per-app workaround.

Verification

  • All 14 libs symlinked into `node_modules/@ngaf/` (verified `ls -la`)
  • Linux `@next/swc-*` bindings preserved: 4 entries before, 4 after (additive install, not regeneration)
  • `pnpm nx run-many -t lint,test -p design-tokens,ui-react,example-layouts,cockpit` — green
  • `pnpm nx build cockpit-chat-timeline-angular` — green (uses the new package import)
  • `pnpm nx build website` — green

Risk

Lockfile churn: `npm install` added 16 packages (workspace metadata for the libs), 545 funding pings, no `@next/swc-*` Linux bindings dropped. Minimal — additive only.

🤖 Generated with Claude Code

Root package.json `workspaces` only had `["packages/*", "apps/*"]`,
so @ngaf/* libs were not symlinked into node_modules. esbuild's CSS
resolver couldn't see them, forcing the chat-timeline pilot to use a
5-level relative path for its theme.css import.

Adding `libs/*` to the workspaces glob and running npm install symlinks
all 14 @ngaf/* libs into node_modules. The pilot now uses the package
import path: @import "@ngaf/example-layouts/theme.css".

Stage 2 (remaining 31 example apps) can use the clean import path from
day one. Linux @next/swc-* bindings preserved (4 → 4) — npm install was
additive, not a regeneration.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cacheplane Ready Ready Preview, Comment May 13, 2026 9:11pm

Request Review

@blove blove merged commit 81717c4 into main May 13, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant