chore: configure Tailwind 4 and align lib tsconfigs

Wire Tailwind CSS 4 in the portal-shell app per ADR-0016 (the future
host of spartan-ng components in libs/shared/ui will read from the
Tailwind tokens via the shared-tokens lib).

- pnpm add -D tailwindcss @tailwindcss/postcss postcss
- apps/portal-shell/postcss.config.js declares @tailwindcss/postcss
- apps/portal-shell/src/styles.scss renamed to styles.css and now
  contains a single @import 'tailwindcss' directive. Plain CSS for the
  global file avoids the Sass @import deprecation warning that fires
  when Tailwind directives sit inside SCSS. Component-level styles can
  still use SCSS.
- apps/portal-shell/project.json styles entry updated accordingly.

Side fix: align libs/shared/tokens and libs/shared/util tsconfigs from
module: commonjs to module: esnext. The Nx @nx/js:library --bundler=
tsc generator emits commonjs by default, but tsconfig.base.json
specifies moduleResolution: bundler, which TS only allows alongside
esnext or es2015+ modules. Without the alignment, those libs failed to
build (TS5095). All apps and libs now build green.

spartan-ng wiring is intentionally NOT in this commit. spartan-ng is
currently at 0.0.1-alpha.681 - clearly pre-1.0, which trips the
project rule against pre-1.0 dependencies. ADR-0016 chose spartan-ng
with the copy-paste mitigation, but the alpha state warrants an
explicit go/no-go decision before committing the workspace to it.
This commit is contained in:
Julien Gautier
2026-04-30 17:50:35 +02:00
parent d797becc2b
commit bd8eefb44a
8 changed files with 265 additions and 15 deletions
+3
View File
@@ -44,6 +44,7 @@
"@swc-node/register": "1.11.1",
"@swc/core": "1.15.8",
"@swc/helpers": "0.5.18",
"@tailwindcss/postcss": "^4.2.4",
"@types/jest": "^30.0.0",
"@types/node": "20.19.9",
"@typescript-eslint/utils": "^8.40.0",
@@ -61,8 +62,10 @@
"jsonc-eslint-parser": "^2.1.0",
"lint-staged": "^16.4.0",
"nx": "22.7.0",
"postcss": "^8.5.12",
"prettier": "^3.8.1",
"prisma": "^7.8.0",
"tailwindcss": "^4.2.4",
"ts-jest": "^29.4.0",
"ts-node": "10.9.1",
"tslib": "^2.3.0",