Transforms import.meta.glob() calls into static import maps.
Supported forms include lazy and eager imports, arrays of patterns, negative
patterns, named imports, string or object query options, base, and
TypeScript generic syntax. The transform runs after framework/plugin output is
compiled, so glob calls emitted by SFC compilers or plugins participate in the
same graph as source-authored calls.
Summary
Functions
Extracts static glob patterns from import.meta.glob() calls.
Transforms import.meta.glob() calls in source code.
Functions
Extracts static glob patterns from import.meta.glob() calls.
Returns an empty list when parsing fails or no supported glob call is found.
Patterns are returned exactly as authored, including negative patterns prefixed
with !.
Transforms import.meta.glob() calls in source code.
base_dir is the directory of the file containing the glob call and is used to
resolve patterns to files. filename is only used for parser diagnostics.
Returns the original source unchanged when parsing fails or no glob call is
found.