When using import.meta.glob the build fails, but works with import.meta.globEager #5568
Closed
7 tasks done
Labels
bug: upstream
Bug in a dependency of Vite
Describe the bug
I have files that contain a single quote in their names, for example:
data/y'=0.json
I'm trying to use
import.meta.glob
for lazy loading all the files as needed.This works fine in dev mode. But once I try to build for the production it fails.
Should note the build succeeds when using
import.meta.globEager
instead ofimport.meta.glob
.I've tried to use the latest stable Vite version and the beta version. Both fail.
Reproduction
Create a directory
data
and a JSON filedata/y'=0.json
with some dummy data in it.Try to load the file using
import.meta.glob
:Note
npm run dev
will work as expected. Butnpm run build
will fail.System Info
Used Package Manager
npm
Logs
Validations
The text was updated successfully, but these errors were encountered: