Comprehensive documentation for all public APIs and configuration options.
Main bundling function that compiles and outputs files.
{ input: 'src/index.js', output: 'dist/bundle.js' });
Watches files and triggers rebuilds on changes.
watch(['src/**/*'], () => build(...) });
input
string
Path to entry file
{
name: 'my-plugin',
apply: () => ({ transform(source) { ... } })
}
Resolve module paths with custom aliasing
resolve('./components/button');
Create bundle analysis report
analyze({ bundle: 'dist/bundle.js', stats: 'report.json' });
Terser-based code minification
minify({ code: 'function add(a,b) { return a+b }', output: 'add-min.js' });
Explore our API sandbox or join the Discord community to get live answers from developers.