Skip to main content

bud.get

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

Usage

Get an instance:

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

Once you have an instance you can continue chaining off it.

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

The parent instance is accessible using bud.root.

export default async bud => {
/**
* Parent instance
*/
bud
/**
* Uses bud.get to move to child instance
*/
.get('child-instance')
.entry({
child: ['index.js'],
})
/**
* Uses bud.root to move back to parent instance
*/
.root.setUrl(`http://localhost:3030`)
}
UtilityDescription
bud.makeCreate a child compiler