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
Merged
Conversation
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 Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
Drop the codemod suggestion and the per-option mapping from the README notice; the migration guide is the place that tracks both.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
webpack injects CSS into the DOM itself —
experiments.cssdefaults to"auto"since 5.109.0, and theexportType: "style"parser option covers the defaultinjectType: "styleTag"— sostyle-loaderis 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.jsononly, 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
/loadersindex 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.cssversion against webpack's schema and changelog. Reviewed and edited by me before pushing.Generated by Claude Code