From d1c71fd8abb6bcc7babcb11b6be0e4a13bed27e5 Mon Sep 17 00:00:00 2001 From: alexander-akait Date: Thu, 27 Aug 2026 14:55:36 +0000 Subject: [PATCH 1/2] docs: deprecate css-loader in favor of webpack's built-in CSS support Webpack parses, extracts and minifies CSS itself since experiments.css defaults to "auto" in 5.109.0. Point the README at the Native CSS guide and its migration guide on webpack.js.org. --- .cspell.json | 3 ++- README.md | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.cspell.json b/.cspell.json index ca5a2cb5..fa31d940 100644 --- a/.cspell.json +++ b/.cspell.json @@ -38,7 +38,8 @@ "vspace", "commitlint", "eslintcache", - "akait" + "akait", + "codemod" ], "ignorePaths": [ "CHANGELOG.md", diff --git a/README.md b/README.md index f558a663..8b41f80b 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,15 @@ # css-loader +> [!WARNING] +> +> **`css-loader` is deprecated** — webpack parses CSS itself and no longer needs it. +> +> [`experiments.css`](https://webpack.js.org/configuration/experiments/#experimentscss) defaults to `"auto"` since webpack 5.109.0, so `@import`, `url()` and CSS Modules are handled with no loader at all. +> Read the [Native CSS guide](https://webpack.js.org/guides/native-css/) and follow its [migration guide](https://webpack.js.org/guides/native-css/#migration-guide), or run `npx codemod @webpack/css-plugins-to-native-css` to do most of the migration automatically. +> +> `"auto"` leaves a `.css` rule that already has a loader on that loader, so existing setups keep working and can be migrated one rule at a time. + The `css-loader` interprets `@import` and `url()` like `import/require()` and resolves them. ## Getting Started From 511bbeebf4e9027012fa285f7de0c5304b121ae6 Mon Sep 17 00:00:00 2001 From: alexander-akait Date: Thu, 27 Aug 2026 15:50:37 +0000 Subject: [PATCH 2/2] docs: trim the deprecation notice to the migration guide link Drop the codemod suggestion and the per-option mapping from the README notice; the migration guide is the place that tracks both. --- .cspell.json | 3 +-- README.md | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.cspell.json b/.cspell.json index fa31d940..ca5a2cb5 100644 --- a/.cspell.json +++ b/.cspell.json @@ -38,8 +38,7 @@ "vspace", "commitlint", "eslintcache", - "akait", - "codemod" + "akait" ], "ignorePaths": [ "CHANGELOG.md", diff --git a/README.md b/README.md index 8b41f80b..407e914f 100644 --- a/README.md +++ b/README.md @@ -20,10 +20,9 @@ > > **`css-loader` is deprecated** — webpack parses CSS itself and no longer needs it. > -> [`experiments.css`](https://webpack.js.org/configuration/experiments/#experimentscss) defaults to `"auto"` since webpack 5.109.0, so `@import`, `url()` and CSS Modules are handled with no loader at all. -> Read the [Native CSS guide](https://webpack.js.org/guides/native-css/) and follow its [migration guide](https://webpack.js.org/guides/native-css/#migration-guide), or run `npx codemod @webpack/css-plugins-to-native-css` to do most of the migration automatically. +> Read the [Native CSS guide](https://webpack.js.org/guides/native-css/) and follow its [migration guide](https://webpack.js.org/guides/native-css/#migration-guide). > -> `"auto"` leaves a `.css` rule that already has a loader on that loader, so existing setups keep working and can be migrated one rule at a time. +> Existing setups keep working: built-in CSS support stays off for any `.css` rule that already has a loader, so you can migrate one rule at a time. The `css-loader` interprets `@import` and `url()` like `import/require()` and resolves them.