Skip to main content
zerotal

Documentation


Documentation / zerotal / dev / buildJsBundle

Function: buildJsBundle()

buildJsBundle(input, outdir, minify?): Promise<{ success: boolean; logs: unknown[]; }>

Defined in: packages/core/src/dev/CssPlugins.ts:110

Bundle a JavaScript entry point for the browser using Bun's native bundler.

Used by FlowProvider to bundle resources/js/app.jspublic/js/app.js. Workspace package imports (e.g. @zerotal/devtools/client) are resolved from the app's own node_modules and tree-shaken into the output.

Parameters

input

string

Absolute path to the JS/TS entry (e.g. ${cwd}/resources/js/app.js)

outdir

string

Absolute path to the output directory (e.g. ${cwd}/public/js)

minify?

boolean = false

Whether to minify the output (true in production)

Returns

Promise<{ success: boolean; logs: unknown[]; }>