From 0ac463034920eecc1bf1903cb85e827bc3155bee 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 html-loader in favor of webpack's built-in HTML support Webpack treats HTML as a first-class module type since experiments.html defaults to "auto" in 5.109.0. Point the README at the Native HTML guide and its migration guide on webpack.js.org. --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index d87e15cd..8d736423 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,15 @@ # html-loader +> [!WARNING] +> +> **`html-loader` is deprecated** — webpack treats HTML as a first-class module type and no longer needs it. +> +> [`experiments.html`](https://webpack.js.org/configuration/experiments/#experimentshtml) defaults to `"auto"` since webpack 5.109.0, so `.html` files are parsed, the resources their attributes reference are bundled, and the markup is minified in production, all with no loader. +> Read the [Native HTML guide](https://webpack.js.org/guides/native-html/) and follow its [migration guide](https://webpack.js.org/guides/native-html/#migrating-from-html-loader). +> +> `"auto"` leaves an `.html` rule that already has a loader on that loader, so existing setups keep working and can be migrated one rule at a time. + Exports HTML as string. HTML is minimized when the compiler demands. ## Getting Started From 8f57331b7a875f4c6b83ae946e605cd2868b02ca 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. --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 8d736423..b0521a88 100644 --- a/README.md +++ b/README.md @@ -18,10 +18,9 @@ > > **`html-loader` is deprecated** — webpack treats HTML as a first-class module type and no longer needs it. > -> [`experiments.html`](https://webpack.js.org/configuration/experiments/#experimentshtml) defaults to `"auto"` since webpack 5.109.0, so `.html` files are parsed, the resources their attributes reference are bundled, and the markup is minified in production, all with no loader. > Read the [Native HTML guide](https://webpack.js.org/guides/native-html/) and follow its [migration guide](https://webpack.js.org/guides/native-html/#migrating-from-html-loader). > -> `"auto"` leaves an `.html` 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 HTML support stays off for any `.html` rule that already has a loader, so you can migrate one rule at a time. Exports HTML as string. HTML is minimized when the compiler demands.