From 6a188e3063e5fca3e41e1e072f92a02363956c81 Mon Sep 17 00:00:00 2001 From: alexander-akait Date: Tue, 24 Mar 2026 15:04:45 +0300 Subject: [PATCH 1/2] fix: rspack compatibility more. --- src/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/index.js b/src/index.js index ea71d4d54..9767001a8 100644 --- a/src/index.js +++ b/src/index.js @@ -318,6 +318,8 @@ function printStats(stats, context) { (compiler).compilers; childStatsOptions.colors = + // rspack compatibility + firstCompiler.webpack.cli && typeof firstCompiler.webpack.cli.isColorSupported === "function" ? firstCompiler.webpack.cli.isColorSupported() : isColorSupported(); @@ -334,6 +336,8 @@ function printStats(stats, context) { if (typeof statsOptions.colors === "undefined") { const { compiler } = /** @type {{ compiler: Compiler }} */ (context); statsOptions.colors = + // rspack compatibility + compiler.webpack.cli && typeof compiler.webpack.cli.isColorSupported === "function" ? compiler.webpack.cli.isColorSupported() : isColorSupported(); From 8b9804b2ba41d271b3618469f3699c0a6567a674 Mon Sep 17 00:00:00 2001 From: alexander-akait Date: Tue, 24 Mar 2026 15:15:05 +0300 Subject: [PATCH 2/2] chore: adding changelog --- .changeset/breezy-rice-behave.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/breezy-rice-behave.md diff --git a/.changeset/breezy-rice-behave.md b/.changeset/breezy-rice-behave.md new file mode 100644 index 000000000..f053dc849 --- /dev/null +++ b/.changeset/breezy-rice-behave.md @@ -0,0 +1,5 @@ +--- +"webpack-dev-middleware": patch +--- + +Fixed compatibility with rspack.