mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
## What? This PR adds support for `cssmodules-pure-no-check` in CSS Modules by upgrading `postcss-modules-local-by-default` from 4.0.4 to 4.2.0 (`cssmodules-pure-no-check` was also recently [merged into LightningCSS 1.29.3](https://github.com/parcel-bundler/lightningcss/pull/898)) ## Why? Global CSS selectors like View Transitions API require global scope to work properly. Currently, there's no clean way to use these selectors with CSS Modules in Next.js, which causes issues when: 1. Using the View Transitions API 2. Migrating from css-in-js libraries like styled-components to React Server Components with CSS Modules ## How? - Upgrades `postcss-modules-local-by-default` to 4.2.0 - Adds support for the `/* cssmodules-pure-no-check */` comment pattern in CSS files which disables CSS Modules localization for that file - This mirrors established escape hatches in other tools (`@ts-nocheck`, `/* eslint-disable */`) - Added tests (similar to one @samcx wrote previously) to ensure functionality works correctly The approach was previously approved by @samcx in issue #77232, who mentioned that LightningCSS was already bumped, but we needed to bump the PostCSS side Fixes #77232 --------- Co-authored-by: Sam Ko <[email protected]>