Skip to content
This repository was archived by the owner on Aug 27, 2026. It is now read-only.

docs: deprecate style-loader in favor of webpack's built-in CSS support - #653

Merged
alexander-akait merged 2 commits into
mainfrom
claude/css-html-loader-deprecation-ec783u
Aug 27, 2026
Merged

docs: deprecate style-loader in favor of webpack's built-in CSS support#653
alexander-akait merged 2 commits into
mainfrom
claude/css-html-loader-deprecation-ec783u

Conversation

@alexander-akait

Copy link
Copy Markdown
Member

Summary

webpack injects CSS into the DOM itself — experiments.css defaults to "auto" since 5.109.0, and the exportType: "style" parser option covers the default injectType: "styleTag" — so style-loader is no longer needed. Adds a deprecation notice at the top of the README linking the Native CSS guide, its migration guide and the codemod. The notice also names the three options with no native equivalent (attributes, insert, styleTagTransform), so anyone relying on them knows to stay.

What kind of change does this PR introduce?

docs

Did you add tests for your changes?

n/a — README and .cspell.json only, no code change.

Does this PR introduce a breaking change?

No.

If relevant, what needs to be documented once your changes are merged or what have you already documented?

Nothing further — https://webpack.js.org/loaders/style-loader/ is generated from this README, so the notice appears there on the next docs build. The /loaders index already marks the loader deprecated.

Use of AI

Yes — Claude Code drafted the notice and checked every linked anchor against the guides in webpack.js.org and the experiments.css version against webpack's schema and changelog. Reviewed and edited by me before pushing.


Generated by Claude Code

The exportType: "style" parser option injects a <style> element from the
webpack runtime. Point the README at the Native CSS guide and its
migration guide on webpack.js.org.
@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.93%. Comparing base (5d8caa5) to head (ee71d79).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #653   +/-   ##
=======================================
  Coverage   94.93%   94.93%           
=======================================
  Files          15       15           
  Lines         296      296           
  Branches      149      149           
=======================================
  Hits          281      281           
  Misses         15       15           

☔ 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.

Drop the codemod suggestion and the per-option mapping from the README
notice; the migration guide is the place that tracks both.
@alexander-akait
alexander-akait merged commit ae37ad0 into main Aug 27, 2026
16 of 19 checks passed
@alexander-akait
alexander-akait deleted the claude/css-html-loader-deprecation-ec783u branch August 27, 2026 15:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant