Skip to content

docs: recommend webpack's built-in CSS, mark css-loader & co. as deprecated - #624

Merged
alexander-akait merged 3 commits into
mainfrom
docs/native-css-first
Nov 6, 2026
Merged

alexander-akait merged 3 commits into
mainfrom
docs/native-css-first

Conversation

@alexander-akait

@alexander-akait alexander-akait commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Summary

Built-in CSS is stable and on by default since webpack 5.109.0 (experiments.css: "auto"), and css-loader, style-loader and mini-css-extract-plugin are deprecated. The README already led with built-in CSS; this fixes two things around it.

  • The note said built-in CSS "requires experiments.css to be enabled". It's on by default since 5.109.0 and only needs experiments.css: true on older webpack 5 releases. The examples keep css: true, which is harmless.
  • The loader alternatives (css-loader, style-loader, MiniCssExtractPlugin) are labelled deprecated, link the Native CSS migration guide, and are no longer called "recommended".

Checked: Prettier and cspell pass on README.md.


Generated by Claude Code

Summary by CodeRabbit

  • Documentation
    • Clarified the version requirements and default activation behavior for built-in CSS support.
    • Explained how .css rules affect automatic handling, and how to link or inject emitted CSS.
    • Retained the loader-chain alternative and marked css-loader, style-loader, and MiniCssExtractPlugin examples as deprecated.

…ecated

- The built-in CSS support is on by default since webpack 5.109.0
  (`experiments.css: "auto"`); say when `experiments.css: true` is still
  needed instead of implying it always is.
- css-loader, style-loader and mini-css-extract-plugin are deprecated:
  label them so, and link the Native CSS migration guide.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013FhutTnKEPLYcuGNGNijRS
@linux-foundation-easycla

linux-foundation-easycla Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

CLA Not Signed

One or more co-authors of this pull request were not found. You must specify co-authors in commit message trailer via:

Co-authored-by: name <email>

Supported Co-authored-by: formats include:

  1. Anything <id+login@users.noreply.github.com> - it will locate your GitHub user by id part.
  2. Anything <login@users.noreply.github.com> - it will locate your GitHub user by login part.
  3. Anything <public-email> - it will locate your GitHub user by public-email part. Note that this email must be made public on Github.
  4. Anything <other-email> - it will locate your GitHub user by other-email part but only if that email was used before for any other CLA as a main commit author.
  5. login <any-valid-email> - it will locate your GitHub user by login part, note that login part must be at least 3 characters long.

Alternatively, if the co-author should not be included, remove the Co-authored-by: line from the commit message.

Please update your commit message(s) by doing git commit --amend and then git push [--force] and then request re-running CLA check via commenting on this pull request:

/easycla

@changeset-bot

changeset-bot Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3e71300

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The README documents the webpack versions that support built-in CSS and the default behavior from webpack 5.109.0. It describes how to route CSS to css-loader or use exportType: "style". It labels the legacy css-loader and style-loader chain and MiniCssExtractPlugin as deprecated, and directs new projects to the built-in CSS migration guide.

Merge Risk: Minimal · up to 3e713

This PR only updates README guidance on built-in CSS support. It carries no runtime risk. The missing CLA authorization is a process item for the maintainers, not a code defect.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly describes the README changes for built-in CSS support and deprecated loader alternatives.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5385c5b4-6c8c-495e-af8c-988874360cc6
Commits

Reviewing files that changed from the base of the PR and between 3fb91ff and 3e71300.

Files selected for processing: 1

  • README.md
Files skipped from review as they are similar to previous changes: 1

  • README.md

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

@codecov

codecov Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.93%. Comparing base (7a40320) to head (3e71300).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #624   +/-   ##
=======================================
  Coverage   96.93%   96.93%           
=======================================
  Files           2        2           
  Lines         652      652           
=======================================
  Hits          632      632           
  Misses         20       20           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4421364f-b54b-4e96-a9b1-22866c4611d9
Commits

Reviewing files that changed from the base of the PR and between 7a40320 and 3aeb3cb.

Files selected for processing: 1

  • README.md

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

Comment thread README.md Resolved
…nking the CSS

- `css/auto` needs webpack 5.87.0 or later (verified: 5.86.0 fails with
  `No parser registered for css/auto`, 5.87.0 builds).
- `experiments.css: "auto"` turns built-in CSS off when another rule handles
  `.css` files, so the examples keep `experiments.css: true`; a remaining
  `css-loader` rule then needs `type: "javascript/auto"`.
- Built-in CSS emits a `.css` file the page must link (verified in a browser:
  a JS-only page stays unstyled). Point to native HTML (an HTML entry or
  `output.html: true`), which adds the `<link>`, or `exportType: "style"`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013FhutTnKEPLYcuGNGNijRS
…tions

- `exportType: "style"` needs webpack 5.106.0+, an HTML entry or
  `output.html` 5.108.0+ (with `experiments.html: true` before 5.109.0);
  linking the emitted file yourself stays the fallback. Versions taken from
  webpack's CHANGELOG.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013FhutTnKEPLYcuGNGNijRS
@alexander-akait
alexander-akait merged commit 9a00942 into main Nov 6, 2026
15 of 16 checks passed
@alexander-akait
alexander-akait deleted the docs/native-css-first branch November 6, 2026 16:23
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