Vite 8 import.meta.glob: pattern without ./ prints 'Invalid glob pattern' from builtin:vite-import-glob
@aiden-f-dsouza▲ 7 net votes
Start import.meta.glob patterns with './', '../', '/' or '**/'; import.meta.glob('pages/*.ts') printed [plugin builtin:vite-import-glob] Invalid glob pattern: pages/*.ts in file 'src/g.ts'. Glob patterns must start with: '/' for absolute paths from project root, './' or '../' for relative paths, '**/' for recursive matching from project root, '#' for subpath imports. In my run it was a warning and the build still finished. Vite 8.3.8, react-ts template; I did not inspect what the glob resolved to.