electron-userland/electron-builder là dự án mã nguồn mở trên GitHub với 14.7k sao, viết chủ yếu bằng TypeScript. A complete solution to package and build a ready for distribution Electron app with “auto update” support out of the box
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
A complete solution to package and build a ready for distribution Electron app for macOS, Windows and Linux with “auto update” support out of the box. 📦
Always looking for community contributions! 👀 Setting up a dev environment is easy to do 🪩
Sponsors
Notes, Tasks, Projects. All in a Single Place.
Your gateway to understanding your diabetes data
An open, source-available software licensing and distribution API
ToDesktop: An all-in-one platform for building and releasing Electron apps
Dashcam: Capture the steps to reproduce any bug with video crash reports for Electron.
Publishing artifacts to GitHub Releases, Amazon S3 and DigitalOcean Spaces.
Advanced building:
Pack in a distributable format (already packaged app).
Separate build steps.
Build and publish in parallel, using hard links on CI server to reduce IO and disk space usage.
Docker images to build Electron app for Linux or Windows on any platform.
Downloads all required tool files on demand automatically (e.g., to code sign a Windows application, to make AppX), no setup required.
Question
Answer
“I want to configure electron-builder”
See options
“I found a bug or I have a question”
Open an issue
“I want to support development”
Donate
Requirements
Node.js >=22.12.0 is required for v27.
⚠️ Upgrading from v26? v27 is a major release with breaking changes (native ESM, Node >=22.12, and removed deprecated APIs). Start with What's New in v27 for the highlights and the silent default changes, then read the full breaking changes before upgrading.
Then run the automated migration command — it rewrites your config in place:
See all options. Option files to indicate which files should be packed in the final application, including the entry file, maybe required.
You can also use separate configuration files, such as js, ts, yml, and json/json5. See read-config-file for supported extensions. JS Example for programmatic API
Add icons.
Add the scripts key to the development package.json:
Then you can run yarn app:dist (to package in a distributable format (e.g. dmg, windows installer, deb package)) or yarn app:dir (only generates the package directory without really packaging it. This is useful for testing purposes).
To ensure your native dependencies are always matched electron version, simply add script "postinstall": "electron-builder install-app-deps" to your package.json.
If you have native addons of your own that are part of the application (not as a dependency), set nativeModules.nodeGypRebuild to true.
Please note that everything is packaged into an asar archive by default.
For an app that will be shipped to production, you should sign your application. See Where to buy code signing certificates.
Programmatic Usage
TypeScript types are provided and can be found here. See the full programmatic usage guide.
// CommonJS — also works on Node >=22.12.0
const { build, Platform } = require("electron-builder")
build({ targets: Platform.MAC.createTarget(), config: {} })
.then(() => { /* done */ })
.catch(console.error)
Community Boilerplates
electron-react-boilerplate A boilerplate for scalable cross-platform desktop apps.
electron-vue-vite A real simple Electron + Vue3 + Vite5 boilerplate.
vite-electron-builder Secure boilerplate for Electron app based on Vite. Supports multiple frameworks.
electronjs-with-nextjs ElectronJS application with NextJS and TypeScript.
Debug
Set the DEBUG environment variable to debug what electron-builder is doing:
DEBUG=electron-builder
FPM_DEBUG env to add more details about building linux targets (except snap and appimage).
DEBUG_DMG=true env var to add more debugging/verbosity from hdiutil (macOS).
:::tip[Windows cmd]
On Windows the environment variable is set using the set command.
set DEBUG=electron-builder
:::
:::tip[PowerShell]
PowerShell uses different syntax to set environment variables.
$env:DEBUG = "electron-builder"
:::
If you've identified a bug and want to report it, use electron/minimal-repro to create a minimal reproduction case. Attaching one to your issue significantly speeds up diagnosis.
Donate
This open source work is accomplished during free time. If you'd like to have more time invested in it, please consider donating.
Đọc thêm về electron-userland/electron-builder ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/electron-userland/electron-builder là nguồn chính thức.
electron-userland/electron-builder có phải mã nguồn mở không?
Có — electron-userland/electron-builder phát hành theo license MIT, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/electron-userland/electron-builder.
electron-userland/electron-builder có trang demo không?
Dự án có trang chủ ở https://www.electron.build. Tab "Readme" ở trang này thường có ảnh chụp và hướng dẫn bắt đầu nhanh.
electron-userland/electron-builder dùng license gì?
electron-userland/electron-builder phát hành theo license MIT. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
electron-userland/electron-builder là gì?
electron-userland/electron-builder (electron-userland/electron-builder) là dự án TypeScript trên GitHub. Theo mô tả gốc: A complete solution to package and build a ready for distribution Electron app with “auto update” support out of the box
Đọc đầy đủ README ở tab phía trên.
electron-builder có đáng để bạn bỏ thời gian?
ChatGPT, Claude và Perplexity đều đọc được trang này. Hỏi thử xem họ nghĩ gì về electron-builder.