Skip to main content

bud.bundle

Split specified modules into a separate chunk

Usage

The simplest usage is the name of the directory to create the chunk from:

bud.config.mjs
bud.bundle('alpine')

This produces a chunk named js/bundle/alpine.js

You can specify a set of modules to include in the chunk:

bud.config.mjs
bud.bundle('vendor', ['react', 'react-dom'])