From d9098c60bf20edfa292784f24a5161bf340003ac Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 28 Jan 2023 20:45:16 +0800 Subject: [PATCH] fix: escape characters in dynamic import (fix #11824) --- playground/glob-import/escape/(parenthesis)/glob.js | 2 +- playground/glob-import/escape/[brackets]/glob.js | 2 +- playground/glob-import/escape/{curlies}/glob.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/playground/glob-import/escape/(parenthesis)/glob.js b/playground/glob-import/escape/(parenthesis)/glob.js index 9e0d925c4d1026..f0cfdc11398c61 100644 --- a/playground/glob-import/escape/(parenthesis)/glob.js +++ b/playground/glob-import/escape/(parenthesis)/glob.js @@ -1,4 +1,4 @@ -const relative = import.meta.glob('./**/*.js', { eager: true }) +const relative = import.meta.glob(`../(parenthesis)/**/*.js`, { eager: true }) const alias = import.meta.glob('@escape_(parenthesis)_mod/**/*.js', { eager: true, }) diff --git a/playground/glob-import/escape/[brackets]/glob.js b/playground/glob-import/escape/[brackets]/glob.js index 320cf021f9db77..9b0f244f67cd7f 100644 --- a/playground/glob-import/escape/[brackets]/glob.js +++ b/playground/glob-import/escape/[brackets]/glob.js @@ -1,4 +1,4 @@ -const relative = import.meta.glob('./**/*.js', { eager: true }) +const relative = import.meta.glob(`../[brackets]/**/*.js`, { eager: true }) const alias = import.meta.glob('@escape_[brackets]_mod/**/*.js', { eager: true, }) diff --git a/playground/glob-import/escape/{curlies}/glob.js b/playground/glob-import/escape/{curlies}/glob.js index a6d286001567e9..503b1e52501c74 100644 --- a/playground/glob-import/escape/{curlies}/glob.js +++ b/playground/glob-import/escape/{curlies}/glob.js @@ -1,3 +1,3 @@ -const relative = import.meta.glob('./**/*.js', { eager: true }) +const relative = import.meta.glob(`../{curlies}/**/*.js`, { eager: true }) const alias = import.meta.glob('@escape_{curlies}_mod/**/*.js', { eager: true }) export { relative, alias }