rk build
Summary
Build a project.
Description
rk build with no options is the same as rk build --release (release preset).
Usage
rk build [options]Options
| Flag | Alias | Value/type | Allowed values | Default | Required | Conflicts/requires |
|---|---|---|---|---|---|---|
--minify / --no-minify | — | boolean | — | — | no | — |
--uglify (deprecated → --minify) | — | boolean | — | — | no | — |
--compile-ts / --no-compile-ts | — | boolean | — | false | no | — |
--dev-blocks / --no-dev-blocks | — | boolean | — | — | no | — |
--typecheck / --no-typecheck | — | boolean | — | — | no | — |
--solid-dev-mode / --no-solid-dev-mode | — | boolean | — | — | no | — |
--solid-dev (deprecated → --solid-dev-mode) | — | boolean | — | — | no | — |
--write-ts-path / --no-write-ts-path | — | boolean | — | true | no | — |
--no-typescript (deprecated → --no-write-ts-path) | — | boolean | — | — | no | — |
--source-map / --no-source-map | — | boolean | — | true | no | — |
--drop-console / --no-drop-console | — | boolean | — | — | no | — |
--drop-debugger / --no-drop-debugger | — | boolean | — | — | no | — |
--lower-destructuring / --no-lower-destructuring | — | boolean | — | true for release builds, false for debug builds | no | — |
--disable-type-checking (deprecated → --no-typecheck) | — | boolean | — | — | no | — |
--show-copied-files | — | boolean | — | — | no | — |
--build-type | — | string | — | production for rk build, development for rk dev | no | — |
--out-dir | -od | string | — | — | no | — |
--config | — | string | — | roku-config.ts found by walking upward | no | — |
--no-uglify (deprecated → --no-minify) | -nu | boolean | — | — | no | — |
--perfetto-paths | — | string (repeatable) | — | — | no | — |
--perfetto-exclude | — | string (repeatable) | FunctionDeclaration, VariableDeclarator, FunctionExpression, ObjectMethod | — | no | — |
--perfetto-filter | — | string (repeatable) | — | — | no | — |
--debug | -d | boolean | — | — | no | conflicts: --release-js, --release |
--dev (deprecated → --debug) | — | boolean | — | — | no | conflicts: --release-js, --release |
--release | — | boolean | — | — | no | conflicts: --dev, --debug |
--release-js (deprecated → --release) | — | boolean | — | — | no | conflicts: --dev, --debug |
--watch | -w | boolean | — | — | no | conflicts: --archive, --package |
--archive | — | boolean | — | — | no | — |
--archive-format | — | string | squashfs, zip | squashfs | no | — |
--package (deprecated → --archive) | — | boolean | — | — | no | — |
--output | -o | string | — | — | no | requires: --archive, --archive-format |
--bump-minor | -bm | boolean | — | — | no | requires: --archive, --archive-format |
--bump-build | -bb | boolean | — | — | no | requires: --archive, --archive-format |
--metafile | — | string | — | metafile.json | no | — |
--minify
enable minification (whitespace + identifiers).
--uglify
[deprecated] use --minify
--compile-ts
compile the TypeScript/JavaScript bundle to Hermes bytecode locally.
--dev-blocks
keep development-only code: sets DEV to true so if (DEV) {} blocks are kept. --no-dev-blocks sets DEV to false.
--typecheck
enable TypeScript semantic type checking.
--solid-dev-mode
use Solid's development build so Solid devtools can inspect the app (implies --no-compile-ts --no-minify)
--solid-dev
[deprecated] use --solid-dev-mode
--write-ts-path
add the TypeScript entry point (ts_path) to the manifest. --no-write-ts-path is for BrightScript-only apps and DCLs (also skips type checking).
--no-typescript
[deprecated] use --no-write-ts-path
--source-map
generate source maps.
--drop-console
drop console.* calls. Console calls cost milliseconds each on a device, so release builds drop them.
--drop-debugger
drop debugger statements.
--lower-destructuring
rewrite const [a, b] = createSignal() and similar Solid calls to indexed reads for smaller bytecode.
--disable-type-checking
[deprecated] use --no-typecheck
--show-copied-files
show individual file copy operations (verbose mode)
--build-type
Label passed to getBuildType().
--out-dir
output directory for build artifacts
--config
path to config file
Example:
rk build --config apps/demo/roku-config.ts--no-uglify
[deprecated] use --no-minify
--perfetto-paths
Folder path prefix for Perfetto auto-instrumentation (repeatable; comma-separated values per flag also supported)
Example:
rk build --perfetto-paths src/screens,src/components --perfetto-paths src/data--perfetto-exclude
Babel visitor shapes to skip during Perfetto auto-instrumentation (repeatable; comma-separated values per flag also supported)
Example:
rk build --perfetto-paths src --perfetto-exclude FunctionExpression,ObjectMethod--perfetto-filter
Trace name substrings to include during Perfetto auto-instrumentation (repeatable; comma-separated values per flag also supported)
Example:
rk build --perfetto-paths src --perfetto-filter render,fetch--debug
debug build preset: --no-minify --no-compile-ts --typecheck --dev-blocks --no-drop-console --no-drop-debugger.
--dev
[deprecated] use --debug
--release
release build preset (default): --minify --typecheck --no-dev-blocks --drop-console --drop-debugger. Leaves compile-ts at command default (false for rk build).
--release-js
[deprecated] use --release
--watch
watch for changes and rebuild
--archive
create an unsigned squashfs .bin archive in <out-dir>/package/ for local testing
--archive-format
archive format for --archive. Implies --archive. zip is not supported yet.
--package
[deprecated] use --archive
--output
package file name (use with --archive)
--bump-minor
bump minor version and build number (use with --archive)
--bump-build
bump build number (use with --archive)
--metafile
path for the esbuild metafile (relative paths are under <out-dir>/bundle)
Example:
rk build --metafile reports/meta.jsonExamples
rk build --releaseSee also
Updated about 7 hours ago