lumio build
Build the extension bundle for deployment. Produces optimized client bundles for each surface and a source archive.
Usage
lumio build [--outdir <path>]
What it produces
After a successful build, the .lumio-dist/ directory (or custom --outdir) contains:
.lumio-dist/
├── editor/
│ ├── index.html
│ └── assets/
│ ├── editor.[hash].js
│ └── editor.[hash].css
├── layer/
│ ├── index.html
│ └── assets/
│ ├── layer.[hash].js
│ └── layer.[hash].css
├── server/ <- Only if server: true
│ └── functions.[hash].js <- Server bundle (ESM)
└── source.tar.gz <- Source archive (required by review process)
Example
lumio build
Building Sports Scoreboard v1.2.0...
editor 525 KB (153 KB gzipped)
layer 312 KB (98 KB gzipped)
server 44 KB
source.tar.gz assembled
Build complete → .lumio-dist/
Options
| Flag | Description |
|---|---|
--outdir <path> | Output directory (default: .lumio-dist) |
--no-source | Skip generating source.tar.gz (not recommended) |
Source archive
source.tar.gz contains the full source code of your extension (excluding node_modules and .lumio-dist). It is uploaded alongside the bundle during lumio deploy and made available to reviewers.
CHANGELOG.md must include an entry for the version being built. If no entry is found for the current version in lumio.config.json, the CLI prints a warning — the build still succeeds, but release notes will be empty unless you fill them in via the submission wizard.
TypeScript errors
The build fails on TypeScript errors. To check for errors without building:
npx tsc --noEmit
Bundle size limits
| Plan | Max bundle size per surface |
|---|---|
| Free | 10 MB |
| Pro | 50 MB |
If a surface bundle exceeds the limit, the build fails with an error. Optimize with dynamic imports or reduce dependencies.