Skip to main content

Usage

npx @linktr.ee/linkapp build [options]
Run from your LinkApp project root. The command produces a production-ready bundle in dist/.

Options

FlagDescriptionDefault
--sourcemapEmit source maps alongside the build for debuggingfalse
--profilePrint profiling hints (alias: --analyze)false
--compressEmit Brotli-compressed .br assets for CDN deliveryfalse
-h, --helpShow usage information-
--analyze is deprecated but works as an alias of --profile.

What it does

  1. Generates runtime assets in .linkapp/ and builds with Rsbuild in production mode.
  2. Copies public/ into dist/ and, if present, copies app/icon.svg to dist/icon.svg.
  3. Writes content-hashed JS/CSS/assets plus build-manifest.json for asset mapping.
  4. Prints a size summary (raw plus gzip/Brotli estimates for JS/CSS).
  5. When profiling is requested, reminds you to inspect the bundle with your preferred tooling.

Output

dist/
├── index.html
├── build-manifest.json
├── icon.svg            # only if app/icon.svg exists
├── assets/
│   ├── index-XXXXX.js
│   ├── index-XXXXX.css
│   └── vendor-XXXXX.js
└── ...other hashed assets
Filenames are content-hashed so you can cache safely. .br files appear alongside JS/CSS when you pass --compress.

Working with source maps

Use --sourcemap when you need to debug production errors:
npx @linktr.ee/linkapp build --sourcemap
Keep source maps private; they expose your original source.

Profiling and analysis

npx @linktr.ee/linkapp build --profile
The build completes normally and prints a reminder to analyze the output with your preferred bundle inspector. Combine with --sourcemap for more detail.

When builds fail

  • Missing modules or typos: fix the import path or install the dependency.
  • Static asset not found: ensure files referenced from public/ or app/ exist.
  • Large bundles: rebuild with --sourcemap and inspect the emitted asset sizes to spot oversized dependencies.