[**Documentation**](../../../README)

***

[Documentation](../../../README) / [zerotal](../../README) / [dev](../README) / buildJsBundle

# Function: buildJsBundle()

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

Defined in: [packages/core/src/dev/CssPlugins.ts:110](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/dev/CssPlugins.ts#L110)

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

Used by FlowProvider to bundle `resources/js/app.js` → `public/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`[]; \}\>
