From 055ee5e1a8838ec2d368666aa5b086df65ac7fab Mon Sep 17 00:00:00 2001 From: Julian Date: Sun, 17 Sep 2017 22:39:49 +0100 Subject: [PATCH] Support backticks (`) in cjs require module detection --- src/common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common.js b/src/common.js index ca646027..7770106a 100644 --- a/src/common.js +++ b/src/common.js @@ -293,4 +293,4 @@ export function getMapMatch (map, name) { } // RegEx adjusted from https://github.com/jbrantly/yabble/blob/master/lib/yabble.js#L339 -export var cjsRequireRegEx = /(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF."'])require\s*\(\s*("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')\s*\)/g; +export var cjsRequireRegEx = /(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF."'])require\s*\(\s*("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*'|`[^'\\]*(?:\\.[^'\\]*)*`)\s*\)/g