Skip to main content

parse_import_meta_glob

Function parse_import_meta_glob 

Source
pub fn parse_import_meta_glob(
    args: &[JsValue],
    handler: &Handler,
    span: Span,
    diagnostic_id: DiagnosticId,
) -> Option<ImportMetaGlobOptions>
Expand description

Parse the arguments of an import.meta.glob(patterns, options?) call.

args[0] must be a string literal or an array of string literals. args[1] (optional) must be an object literal with known keys.

ยงUnsupported Vite features

  • import.meta.globEager() (removed in Vite 3) is not recognized. Users should migrate to import.meta.glob('...', { eager: true }).
  • as option (deprecated in Vite 5 in favor of query) is not supported. Use query: '?raw' or query: '?url' instead.