Skip to main content

Codebases & Bundles

note

Codebases is Beta, only works with TypeScript and is an Enterprise feature for the time being.

The traditional way to handle codebases on Windmill is two-fold:

However, that can be inconvenient when working with large codebases.

Bundles

To that end, there is a new mode of deployment that relies on the same mechanism as similar services like Lambda or cloud functions: a bundle is built locally by the CLI using esbuild and deployed to Windmill.

This bundle contains all the code and dependencies needed to run the script.

On the latest version of the Windmill CLI, it is done automatically on wmill sync push for any script that falls in the patterns of includes and excludes as defined below.

wmill.yaml

Here are the changes needed in your wmill.yaml:

---
codebases:
- relative_path: ../codebase
includes:
- '**'
excludes: []

Windmill keeps track of the hash of the codebase and will only rebuild the bundle if the codebase or script has changed.

Instance S3 Integration

The bundles requires the instance-wide S3 integration which is where the bundle resides.

VS Code Extension

This mode of deployment automatically works with the VS Code extension to run preview by recognizing the codebases configuration in wmill.yaml and bundling scripts on the fly using the same esbuild.

Example Repository

An example repository with codebases and bundles can be found on GitHub.