Next.js Discord

Discord Forum

fix: preserve semicolon after CSS @layer statement

Unanswered
Arab posted this in #help-forum
Open in Discord
Hey everyone — I have a small PR that passed bot review but needs one
human approval. It's been waiting since June 7.

I have a webpack/CSS build fix that needs review — 30 unit tests pass,
repro case confirmed.

PR: #94251 — fix: preserve semicolon after CSS @layer statement
Link: https://github.com/vercel/next.js/pull/94251

The bug: PostCSS merging of @layer statements drops the terminating
semicolon, producing invalid CSS that crashes lightningcss builds.
Two small PostCSS plugins fix it in CssMinimizerPlugin pipeline.

Closes issue #94191. 30 tests pass covering edge cases.
Anyone familiar with the CSS/webpack build pipeline willing to review?

1 Reply