OptionalblueprintConfig-phase middleware, run in the CLI's blueprint pipeline before any command.
Use this to read or augment stone.builder.* configuration. Runs for every command.
OptionaldescriptionA short description of what the plugin does (shown alongside the name).
A unique, human-readable name (shown when the plugin is loaded).
OptionalonBundle phase: called just before the bundler (Rollup/Vite) runs, after onPrepare.
Advanced hook for bundler-level participation, e.g. mutating stone.builder.rollup/vite
on the blueprint so the plugin's bundler options are honored.
The build context facade.
OptionalonCodegen phase: called once per build, before the entry point is generated, for both
build (production) and dev. Write files into .stone/ and contribute modules or
blueprint statements to the built app via the StonePluginContext helpers.
The build context facade.
A Stone.js CLI plugin: a module's way to participate in the build/bundle lifecycle.
A plugin is a plain object (or the return of a factory). It is fully agnostic of any specific module: the CLI never knows what a plugin does, only when to call it. Plugins are collected from
stone.config(plugins: [...], the explicit path, open to any package) and, for first-party@stone-js/*packages only, auto-discovered from theirpackage.jsonstone.cliPlugincontract (the zero-config path, opt-out viaautoDiscoverPlugins: false).The lifecycle exposes three moments, from earliest to latest:
stone.builder.*..stone/files and contribute modules/config.