Get additional information about the module in question.
Module information for that module. null if the module could not be found.
Adds additional files to be monitored in watch mode so that changes to these files will trigger rebuilds.
Emits a new file that is included in the build output. You can emit chunks, prebuilt chunks or assets.
A referenceId for the emitted file that can be used in various places to reference the emitted file.
Get the combined source maps of all previous plugins.
Get the file name of a chunk or asset that has been emitted via
this.emitFile.
The file name of the emitted file. Relative to output.dir.
Get all module ids in the current module graph.
An iterator of module ids. It can be iterated via
for (const moduleId of this.getModuleIds()) {
// ...
}
or converted into an array via Array.from(this.getModuleIds()).
Loads and parses the module corresponding to the given id, attaching additional
meta information to the module if provided. This will trigger the same
load, transform and
moduleParsed hooks as if the module was imported
by another module.
Use Rolldown's internal parser to parse code to an ESTree-compatible AST.
Optionaloptions: ParserOptions | nullResolve imports to module ids (i.e. file names) using the same plugins that Rolldown uses, and determine if an import should be external.
When calling this function from a resolveId hook, you should
always check if it makes sense for you to pass along the
options.
Optionalimporter: stringOptionaloptions: PluginContextResolveOptionsIf Promise<null> is returned, the import could not be resolved by Rolldown or any plugin
but was not explicitly marked as external by the user.
If an absolute external id is returned that should remain absolute in the output either
via the
makeAbsoluteExternalsRelative
option or by explicit plugin choice in the resolveId hook,
external will be "absolute" instead of true.
Same as PluginContext.debug, but a position param can be supplied.
Same as PluginContext.info, but a position param can be supplied.
Same as PluginContext.warn, but a position param can be supplied.
Same as PluginContext.error, but the id of the current module will
also be added and a position param can be supplied.
Optionalpos: number | { column: number; line: number }
Provides abstract access to the file system.