Repository navigation
fix(css): support namespace CSS Module imports - #2345
Conversation
|
/bigbonk review for issues |
commit: |
|
|
/bigbonk review for issues |
|
/bigbonk review for issues |
|
/bigbonk review for issues |
|
@james-elicx Bonk workflow was cancelled. View workflow run · To retry, trigger Bonk again. |
|
/bigbonk review for issues |
Performance benchmarksCompared 0 improved · 0 regressed · 6 within ±1.5%
View detailed results and traces 🟢 improvement · 🔴 regression · ⚫ change below 1.5% · paired base/head |
|
/bigbonk review for issues |
1 similar comment
|
/bigbonk review for issues |
/bigbonk reviewReviewed the namespace CSS Module import rewrite. Verified locally: Verification I ran
AssessmentThe implementation is well-targeted and defensive. Behavior is gated behind cheap native hook filters ( Minor / non-blocking
Neither is blocking. LGTM. |
|
Posted the review on PR #2345. SummaryI reviewed PR #2345 ( What the PR does: Rewrites static namespace CSS Module imports ( Verification I performed:
Strengths: Behavior is gated behind cheap native hook filters, logic lives in a typed unit-tested helper (not inlined in a generated entry, per AGENTS.md), and Next.js parity references are documented. Minor non-blocking notes: Suggested two clarifying comments — one on the intentional |
Summary
Next.js parity
Fixes both failures from
test/e2e/app-dir/scss/nm-module/nm-module.test.tsin deploy-suite run 28143992598.Next.js intentionally configures CSS Modules with
esModule: falsefor backwards compatibility, soimport * as classes from "example/index.module.scss"exposes the locals object directly. Vite exposes that object as the default export; without this compatibility rewrite the namespace access is undefined and the stylesheet is tree-shaken.References:
Validation
vp test run tests/css-module-imports.test.ts tests/scss-composes.test.ts— 9/9vp checkon touched filesExcludes cacheComponents, PPR, resume, and fallback-shell work.