From 34abd4f28a5e8bdb3c2d03d820faad8907d3856b Mon Sep 17 00:00:00 2001 From: Bjorn Lu Date: Mon, 23 Sep 2024 00:37:45 +0100 Subject: [PATCH] fix(dynamic-import-vars): simplify regex (#1751) refactor(dynamic-import-vars): simplify regex --- packages/dynamic-import-vars/src/dynamic-import-to-glob.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/dynamic-import-vars/src/dynamic-import-to-glob.js b/packages/dynamic-import-vars/src/dynamic-import-to-glob.js index 6dcf7d7fd..ed1ae978e 100644 --- a/packages/dynamic-import-vars/src/dynamic-import-to-glob.js +++ b/packages/dynamic-import-vars/src/dynamic-import-to-glob.js @@ -107,7 +107,7 @@ export function dynamicImportToGlob(node, sourceString) { } // Disallow ./*.ext - const ownDirectoryStarExtension = /^\.\/\*\.[\w]+$/; + const ownDirectoryStarExtension = /^\.\/\*\.\w+$/; if (ownDirectoryStarExtension.test(glob)) { throw new VariableDynamicImportError( `${