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 2b0aef5 commit bffb7b8
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 bffb7b8

Please sign in to comment.