fix(portal-shell): use .postcssrc.json so tailwind utilities are emitted #75
Reference in New Issue
Block a user
Delete Branch "fix/portal-shell/tailwind-source-discovery"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The portal-shell scaffold shipped a
postcss.config.js, but@angular/build(Angular 17+ esbuild pipeline) does not load that file format — it only reads.postcssrc.json. Result: the@tailwindcss/postcssplugin was never registered, Tailwind ran with no source files visible, generated only its@themeblock, and dropped every utility class on the floor.The page therefore rendered unstyled — black text on white — even though
nx buildreported success and shipped a 23 KBstyles*.css.Rename / re-encode the config to
.postcssrc.json. Same plugin, same options, just the file format Angular's esbuild adapter actually reads.Verification
dist/apps/portal-shell/browser/styles*.css.text-3xl,.bg-amber-50,.font-semiboldetc. emittedDoc update
docs/development.mdrepo-layout walkthrough now reads.postcssrc.jsonand explicitly calls out thatpostcss.config.jsis ignored by@angular/build— so a future contributor reaching for the legacy filename gets a hint instead of a silent failure.Test plan
localhost:4200shows the styled layout — header bar with brand link, system-status widget with rounded card, footer with the two language links.nx build portal-shell --configuration=productionsucceeds;dist/.../styles*.csscontains tens of utility-class selectors (not just@themetokens).