plugins
- Type:
RolldownPluginOption - Optional
Defined in: options/input-options.ts:276
The list of plugins to use.
Falsy plugins will be ignored, which can be used to easily activate or deactivate plugins. Nested plugins will be flattened. Async plugins will be awaited and resolved.
See Plugin API document for more details about creating plugins.
Example
js
import { defineConfig } from 'rolldown'
export default defineConfig({
plugins: [
examplePlugin1(),
// Conditional plugins
process.env.ENV1 && examplePlugin2(),
// Nested plugins arrays are flattened
[examplePlugin3(), examplePlugin4()],
]
})