UNPKG

vite

Version:

Native-ESM powered web dev build tool

14 lines (13 loc) 465 B
import type { Plugin } from '../plugin'; import type { ResolvedConfig } from '../config'; /** * Convert `new URL('./foo.png', import.meta.url)` to its resolved built URL * * Supports template string with dynamic segments: * ``` * new URL(`./dir/${name}.png`, import.meta.url) * // transformed to * import.meta.globEager('./dir/**.png')[`./dir/${name}.png`].default * ``` */ export declare function assetImportMetaUrlPlugin(config: ResolvedConfig): Plugin;