Interface: MinimalPluginContext
Defined in: node_modules/.pnpm/rolldown@1.0.0-rc.1/node_modules/rolldown/dist/shared/define-config-DO4TBkJV.d.mts:1779
Extends
PluginContextExtension
Extended by
Properties
environment
environment: EnvironmentDefined in: node_modules/.pnpm/vite@8.0.0-beta.10_@types+node@25.0.10_jiti@2.6.1_yaml@2.8.2/node_modules/vite/dist/node/index.d.ts:2696
Vite-specific environment instance
meta
meta: PluginContextMetaDefined in: node_modules/.pnpm/rolldown@1.0.0-rc.1/node_modules/rolldown/dist/shared/define-config-DO4TBkJV.d.mts:1843
An object containing potentially useful metadata.
Logging Methods
debug()
debug: (log) => void;Defined in: node_modules/.pnpm/rolldown@1.0.0-rc.1/node_modules/rolldown/dist/shared/define-config-DO4TBkJV.d.mts:1841
Generate a "debug" level log.
code will be set to "PLUGIN_LOG" by Rolldown. Make sure to add a distinctive pluginCode to those logs for easy filtering.
./docs/plugin-context-debug.md
Parameters
log
string | RolldownLog | () => string | RolldownLog
Returns
void
error()
error: (e) => neverDefined in: node_modules/.pnpm/rolldown@1.0.0-rc.1/node_modules/rolldown/dist/shared/define-config-DO4TBkJV.d.mts:1798
Similar to this.warn, except that it will also abort the bundling process with an error.
If an Error instance is passed, it will be used as-is, otherwise a new Error instance will be created with the given error message and all additional provided properties.
In all hooks except the onLog hook, the error will be augmented with code: "PLUGIN_ERROR" and plugin: plugin.name properties. If a code property already exists and the code does not start with PLUGIN_, it will be renamed to pluginCode.
Parameters
e
string | RolldownError
Returns
never
info()
info: (log) => void;Defined in: node_modules/.pnpm/rolldown@1.0.0-rc.1/node_modules/rolldown/dist/shared/define-config-DO4TBkJV.d.mts:1811
Generate a "info" level log.
code will be set to "PLUGIN_LOG" by Rolldown. As these logs are displayed by default, use them for information that is not a warning but makes sense to display to all users on every build.
./docs/plugin-context-info.md
Parameters
log
string | RolldownLog | () => string | RolldownLog
Returns
void
warn()
warn: (log) => void;Defined in: node_modules/.pnpm/rolldown@1.0.0-rc.1/node_modules/rolldown/dist/shared/define-config-DO4TBkJV.d.mts:1828
Generate a "warn" level log.
Just like internally generated warnings, these logs will be first passed to and filtered by plugin onLog hooks before they are forwarded to custom onLog or onwarn handlers or printed to the console.
We encourage you to use objects with a pluginCode property as that will allow users to easily filter for those logs in an onLog handler.
./docs/plugin-context-warn.md
Parameters
log
string | RolldownLog | () => string | RolldownLog
Returns
void