From 99d97462bdf3268412aa8baa981f7ac28214a4ed Mon Sep 17 00:00:00 2001 From: bluwy Date: Fri, 26 Jul 2024 17:55:22 +0800 Subject: [PATCH] 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( `${