Skip to main content

bud.before

bud.before allows you to execute arbitrary code directly prior to the start of the compilation process.

Usage

Using an asyncronous function:

bud.config.ts
import type {Bud} from '@roots/bud'

export default async (bud: Bud) => {
bud.before(async bud => {
// Do something before the compilation has completed
})
}

Using a synchronous function:

bud.config.ts
import type {Bud} from '@roots/bud'

export default async (bud: Bud) => {
bud.before(bud => {
// Do something before the compilation has completed
})
}