Build Process
Flow Browser useselectron-builder to package the application for distribution. The build process compiles TypeScript, bundles assets, and creates platform-specific installers.
Quick Build Commands
Build output will be in the
./dist directory.Build Steps
Type Checking
The build process starts by running TypeScript type checks:This runs two separate type checks:
typecheck:node- Main process and Node.js codetypecheck:web- Renderer process and web code
Vite Build
electron-vite compiles and bundles the application:This:
- Compiles TypeScript to JavaScript
- Bundles renderer code with Vite
- Optimizes assets and code
- Generates source maps
Platform-Specific Builds
Windows
./dist:
Flow-{version}-setup.exe- NSIS installerFlow-{version}-win.zip- Portable version
Windows builds can be created on Windows, macOS, or Linux.
macOS
./dist:
Flow-{version}.dmg- Disk image installerFlow-{version}-mac.zip- Zip archive
Linux
./dist:
Flow-{version}.AppImage- Universal Linux binaryFlow-{version}.deb- Debian/Ubuntu packageFlow-{version}.rpm- Fedora/RHEL package
Linux builds can be created on Linux, macOS, or Windows (with WSL).
Development Builds
For testing the build process without creating installers:./dist/{platform}-unpacked without creating installers. Useful for:
- Testing production builds locally
- Debugging build issues
- Inspecting bundled files
Build Configuration
Build settings are configured inpackage.json under the build key:
Widevine VMP Signing
What is VMP Signing?
Widevine Verified Media Path (VMP) signing ensures your browser can play DRM-protected content from streaming services like Netflix, Spotify, and Disney+.Setup Process
Create EVS Account
Sign up for a Castlabs EVS (Electron Video Services) account:Create EVS Account
Development builds work without VMP signing, but DRM content playback may be limited.
Build Troubleshooting
Native Module Errors
If you encounter native module build errors:Build Cache Issues
Clear build artifacts and rebuild:reset script removes:
dist/- Build outputout/- Compiled codenode_modules/- Dependencies.yalc/- Local package links- Package manager cache
Type Check Failures
Fix type errors before building:CI/CD Builds
For automated builds in CI/CD pipelines:The
postinstall script automatically rebuilds native modules during bun install, so no manual rebuild is needed in CI.Build Scripts Reference
| Script | Command | Description |
|---|---|---|
build | bun run build | Compile source (no packaging) |
build:unpack | bun build:unpack | Build and unpack (no installer) |
build:win | bun build:win | Build Windows installer |
build:mac | bun build:mac | Build macOS DMG |
build:linux | bun build:linux | Build Linux packages |
reset | bun run reset | Clean all build artifacts |
Next Steps
Contributing
Learn how to contribute to Flow Browser
Architecture
Understand the codebase structure