Skip to content

Commit

Permalink
Adjust plugin detection regex in dev server config.
Browse files Browse the repository at this point in the history
  • Loading branch information
ray-lee committed Apr 22, 2024
1 parent 3a2e92a commit 1ffb6d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion webpackDevServerConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 1ffb6d6

Please sign in to comment.