Interface PluginContainer
Properties
options
Methods
buildStart
Parameters
Returns Promise<void>
close
Returns Promise<void>
getModuleInfo
Parameters
load
- load(id: string, options?: { ssr?: boolean }): Promise<LoadResult>
Parameters
id: string
Optional options: { ssr?: boolean }
resolveId
- resolveId(id: string, importer?: string, options?: { attributes?: Record<string, string>; custom?: CustomPluginOptions; isEntry?: boolean; skip?: Set<Plugin<any>>; ssr?: boolean }): Promise<null | PartialResolvedId>
Parameters
id: string
Optional importer: string
Optional options: { attributes?: Record<string, string>; custom?: CustomPluginOptions; isEntry?: boolean; skip?: Set<Plugin<any>>; ssr?: boolean }
Optional attributes?: Record<string, string>
Optional isEntry?: boolean
Optional skip?: Set<Plugin<any>>
Optional ssr?: boolean
transform
- transform(code: string, id: string, options?: { inMap?: SourceMapInput; ssr?: boolean }): Promise<{ code: string; map: null | SourceMap | { mappings: "" } }>
Parameters
code: string
id: string
Optional options: { inMap?: SourceMapInput; ssr?: boolean }
Returns Promise<{ code: string; map: null | SourceMap | { mappings: "" } }>
watchChange
- watchChange(id: string, change: { event: "create" | "update" | "delete" }): Promise<void>
Parameters
id: string
change: { event: "create" | "update" | "delete" }
event: "create" | "update" | "delete"
Returns Promise<void>
This file is refactored into TypeScript based on https://github.com/preactjs/wmr/blob/main/packages/wmr/src/lib/rollup-plugin-container.js