method
PluginBuilder.onEnd
): this;
Register a callback that runs when bundling ends, after all modules have been bundled and the build is complete.
@returns
this for method chaining
const plugin: Bun.BunPlugin = {
name: "my-plugin",
setup(builder) {
builder.onEnd((result) => {
console.log("bundle just finished!!", result);
});
},
};Referenced types
type OnEndCallback = (result: BuildOutput) => void | Promise<void>