From db665601c659375f905bda449ba0c944d3772c16 Mon Sep 17 00:00:00 2001 From: Ray Lee Date: Mon, 22 Apr 2024 11:27:53 -0400 Subject: [PATCH] Adjust plugin detection regex in dev server config. --- webpackDevServerConfig.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpackDevServerConfig.js b/webpackDevServerConfig.js index 9d43429..594941a 100644 --- a/webpackDevServerConfig.js +++ b/webpackDevServerConfig.js @@ -211,7 +211,7 @@ module.exports = async ({ `, ); - const pluginsPattern = /plugins:\s+\[\s+(.*?),?\s+\]/s; + const pluginsPattern = /plugins:\s*\[\s*(.*?),?\s*\]/s; if (pluginsPattern.test(pageWithScript)) { return pageWithScript.replace(