Transform import.meta.glob() calls into static import maps.
Uses OXC AST to find calls, resolves glob patterns at build time,
and patches the source with OXC.patch_string/2.
Example
// Source
const modules = import.meta.glob('./pages/*.ts')
// Transformed (lazy — default)
const modules = {
"./pages/home.ts": () => import("./pages/home.ts"),
"./pages/about.ts": () => import("./pages/about.ts"),
}
// With { eager: true }
import * as __glob_0 from "./pages/home.ts"
import * as __glob_1 from "./pages/about.ts"
const modules = {
"./pages/home.ts": __glob_0,
"./pages/about.ts": __glob_1,
}
Summary
Functions
Transform import.meta.glob() calls in source code.