Skip to content

docs(module): document module.parser.css.pure (strict pure mode)#8245

Merged
alexander-akait merged 1 commit into
mainfrom
docs/css-parser-pure-mode
May 18, 2026
Merged

docs(module): document module.parser.css.pure (strict pure mode)#8245
alexander-akait merged 1 commit into
mainfrom
docs/css-parser-pure-mode

Conversation

@bjohansebas
Copy link
Copy Markdown
Member

Summary

Webpack 5.107 adds a new pure parser option for css/module and css/auto that mirrors postcss-modules-local-by-default's pure mode. Every selector must contain at least one local class or id; otherwise the build fails.

Documents the option, plus the two opt-out comments:

  • /* cssmodules-pure-ignore */ (per-rule)
  • /* cssmodules-pure-no-check */ (per-file)

…and the constructs that are exempt by design (nested rules under local-bearing ancestors, &, @keyframes, @counter-style). Added in configuration/module.mdx next to module.parser.css.namedExports.

Refs: webpack/webpack#20946

Test plan

  • Visual check of the new section and code examples
  • Verify the badge shows "5.107.0+"

Use of AI

Drafted with Claude under human review. The contributor verified each change against the upstream webpack PR before commit.

Webpack 5.107 adds a new pure parser option for css/module and css/auto
that mirrors postcss-modules-local-by-default's pure mode. Every
selector must contain at least one local class or id, otherwise the
build fails. Documents the option, plus the two opt-out comments
(/* cssmodules-pure-ignore */ per-rule and /* cssmodules-pure-no-check */
per-file) and the constructs that are exempt by design.

Refs: webpack/webpack#20946
@vercel
Copy link
Copy Markdown

vercel Bot commented May 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
webpack-js-org Ready Ready Preview, Comment May 17, 2026 2:31am

Request Review

@alexander-akait alexander-akait merged commit a5ab2ad into main May 18, 2026
10 checks passed
@alexander-akait alexander-akait deleted the docs/css-parser-pure-mode branch May 18, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants