mirror of https://github.com/webpack/webpack.git
chore: change globToRegex to RegExp
This commit is contained in:
parent
704f0f4134
commit
927734fa26
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const globToRegex = require("glob-to-regexp");
|
||||
const {
|
||||
JAVASCRIPT_MODULE_TYPE_AUTO,
|
||||
JAVASCRIPT_MODULE_TYPE_ESM,
|
||||
|
|
@ -309,10 +308,10 @@ const PLUGIN_NAME = "DefinePlugin";
|
|||
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 = globToRegex(
|
||||
RuntimeGlobals.requireScope
|
||||
const WEBPACK_REQUIRE_FUNCTION_REGEXP = new RegExp(
|
||||
`${RuntimeGlobals.require}\\..*`
|
||||
);
|
||||
const WEBPACK_REQUIRE_IDENTIFIER_REGEXP = globToRegex(RuntimeGlobals.require);
|
||||
const WEBPACK_REQUIRE_IDENTIFIER_REGEXP = new RegExp(RuntimeGlobals.require);
|
||||
|
||||
class DefinePlugin {
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue