Skip to main content

bud.lazy

Configure lazy compilation settings.

In development bud.js compiles imports (not entrypoints) lazily.

Usage

Enable lazy compilation.

bud.lazy()
bud.lazy(true)

Disable lazy compilation.

bud.lazy(false)

Custom configuration

For more information see webpack's documentation on experiments.lazyCompilation.

bud.lazy({
// disable lazy compilation for dynamic imports
imports: false,

// disable lazy compilation for entries
entries: false,

// do not lazily compile moduleB
test: module => !/moduleB/.test(module.nameForCondition()),
})