Skip to content

Commit

Permalink
chore: fix RegExp string
Browse files Browse the repository at this point in the history
  • Loading branch information
tthijm committed Feb 27, 2024
1 parent 927734f commit e20205c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/DefinePlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ const VALUE_DEP_PREFIX = `webpack/${PLUGIN_NAME} `;
const VALUE_DEP_MAIN = `webpack/${PLUGIN_NAME}_hash`;
const TYPEOF_OPERATOR_REGEXP = /^typeof\s+/;
const WEBPACK_REQUIRE_FUNCTION_REGEXP = new RegExp(
`${RuntimeGlobals.require}\\..*`
`${RuntimeGlobals.require}\\s*(!?\\.)`
);
const WEBPACK_REQUIRE_IDENTIFIER_REGEXP = new RegExp(RuntimeGlobals.require);

Expand Down

0 comments on commit e20205c

Please sign in to comment.