📎 Webclip
nexe
Nexe is a command-line utility that compiles a Node.js application into a single executable file. The page presents it as a way to distribute binaries without Node or npm, run apps with different runtimes, and control builds across platforms.
Reading notes#
- Compiles Node.js applications into a single executable.
- Allows distributing binaries without needing Node or npm.
- Supports self-contained applications and multiple applications with different runtimes.
- Mentions idempotent builds, faster deploys, version rollback, and a flexible build pipeline.
- Supports cross-platform builds.
- Allows adding resources to the binary with
-rand reading them withfs.readFileorfs.readFileSync. - By default it tries to download a precompiled executable; if necessary, it uses
--buildto compile from source code. - Documents options such as
input,output,target,bundle,name,cwd,build,resources,patchesandplugins. - The Node.js API shows
compile({ input, build: true, patches: [...] })and the use ofsetFileContentsAsyncto modify source files. - For native modules, the native binaries need to be sent together with the generated executable.
