From abd70c0159558707a46ab543d0ef18acebe41fbf Mon Sep 17 00:00:00 2001 From: alexander-akait Date: Thu, 27 Aug 2026 14:55:30 +0000 Subject: [PATCH 1/2] docs: deprecate mini-css-extract-plugin in favor of webpack's built-in CSS support Extraction is the built-in default, with output.cssFilename and output.cssChunkFilename replacing the plugin's options. Point the README at the Native CSS guide and its migration guide on webpack.js.org. --- .cspell.json | 3 ++- README.md | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.cspell.json b/.cspell.json index 89d901e5..af371f5e 100644 --- a/.cspell.json +++ b/.cspell.json @@ -31,7 +31,8 @@ "commitlint", "unreload", "cnfg", - "tapable" + "tapable", + "codemod" ], "ignorePaths": [ diff --git a/README.md b/README.md index 5780fe7e..f812caf6 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,13 @@ # mini-css-extract-plugin +> [!WARNING] +> +> **`mini-css-extract-plugin` is deprecated** — webpack extracts CSS into separate files itself and no longer needs it. +> +> [`experiments.css`](https://webpack.js.org/configuration/experiments/#experimentscss) defaults to `"auto"` since webpack 5.109.0, and extraction is the built-in default: [`output.cssFilename`](https://webpack.js.org/configuration/output/#outputcssfilename) and [`output.cssChunkFilename`](https://webpack.js.org/configuration/output/#outputcsschunkfilename) replace this plugin's `filename` and `chunkFilename`, with on-demand loading and source maps handled by the runtime. +> Read the [Native CSS guide](https://webpack.js.org/guides/native-css/) and follow its [migration guide](https://webpack.js.org/guides/native-css/#3-replace-mini-css-extract-plugin), or run `npx codemod @webpack/css-plugins-to-native-css` to do most of the migration automatically. + This plugin extracts CSS into separate files. It creates a CSS file for each JS file that contains CSS. It supports On-Demand-Loading of CSS and SourceMaps. It builds on top of a new webpack v5 feature and requires webpack 5 to work. From f07823c2bf69601751754ac2f4ba32deed9680ae 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, 4 insertions(+), 4 deletions(-) diff --git a/.cspell.json b/.cspell.json index af371f5e..89d901e5 100644 --- a/.cspell.json +++ b/.cspell.json @@ -31,8 +31,7 @@ "commitlint", "unreload", "cnfg", - "tapable", - "codemod" + "tapable" ], "ignorePaths": [ diff --git a/README.md b/README.md index f812caf6..15033115 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,9 @@ > > **`mini-css-extract-plugin` is deprecated** — webpack extracts CSS into separate files itself and no longer needs it. > -> [`experiments.css`](https://webpack.js.org/configuration/experiments/#experimentscss) defaults to `"auto"` since webpack 5.109.0, and extraction is the built-in default: [`output.cssFilename`](https://webpack.js.org/configuration/output/#outputcssfilename) and [`output.cssChunkFilename`](https://webpack.js.org/configuration/output/#outputcsschunkfilename) replace this plugin's `filename` and `chunkFilename`, with on-demand loading and source maps handled by the runtime. -> Read the [Native CSS guide](https://webpack.js.org/guides/native-css/) and follow its [migration guide](https://webpack.js.org/guides/native-css/#3-replace-mini-css-extract-plugin), 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/#3-replace-mini-css-extract-plugin). +> +> 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. This plugin extracts CSS into separate files. It creates a CSS file for each JS file that contains CSS. It supports On-Demand-Loading of CSS and SourceMaps.