Skip to main content

bud.get

A utility for multi-compiler builds. bud.get allows you to reference a named compiler.

Usage

Get a compiler:

bud.config.js
export default async bud => bud.get('compiler-name')

Once you have a compiler instance you can continue chaining off it.

bud.config.js
export default async bud =>
bud.get('compiler-name').entry({
main: ['index.js'],
})

The parent compiler is accessible using global or parent.

bud.config.js
export default async bud =>
bud
/**
* Configuring child compiler
*/
.get('child-compiler')
.entry({
child: ['index.js'],
})

/**
* Configuring parent compiler
*/
.get('global')
.entry({
'parent-main': ['parent.js'],
})
UtilityDescription
bud.makeCreate a child compiler