Vite do not scan the dependency when using import.meta.glob #10634
Labels
feat: deps optimizer
Esbuild Dependencies Optimization
p3-minor-bug
An edge case that only affects very specific usage (priority)
regression
The issue only appears after a new release
Describe the bug
https://github.com/candy-Tong/tdesign-vue-next-starter-candy/blob/develop/src/router/index.ts#L5
I use
import.meta.glob
to get allvue-route
file in Vue. Vite do not scan the dependency when using import.meta.glob.So it can not find all the dependence in my project.
echart/core
and build it.echart/charts
and it will rebuild and reflesh the page. That is a bad experience when i first run the project.I also find that Vite2.x do not has this problem ant Vite3.x has.
I find that in this pull request, vite delete the code that transform the
import.meta.glob
in scan JS/TS.If this is not bug, why delete it?
Reproduction
https://github.com/candy-Tong/tdesign-vue-next-starter-candy
Steps to reproduce
The page will refresh when first time to run
vite
System Info
Used Package Manager
pnpm
Logs
Validations
The text was updated successfully, but these errors were encountered: