Neutron is an application to locate app.asar files in Electron applications.
- Electron + Next.js app
- Lightweight build with asset compression
- Only English locales included for smaller size
- Cross-platform: macOS, Windows, and Linux support
-
Install dependencies:
npm install
-
Compress assets (optional, but recommended):
npm run compress-assets
This will optimize images and static assets for a smaller app size.
-
Build the app:
npm run build
This runs Next.js build and packages the Electron app. Only necessary files are included, and only English locales are kept.
-
Run the app in development:
npm run dev
-
Run the app:
npm start
Neutron can be built for macOS, Windows, and Linux using electron-builder.
-
Build for all platforms:
electron-builder -mwl
(
-mwl
= mac, windows, linux) -
Note:
- To build Windows apps on macOS or Linux, you need Wine installed.
- Output installers will be in the
release/
directory.
-
Platform targets:
- macOS:
.dmg
,.zip
- Windows:
.exe
(NSIS installer),.zip
- Linux:
.AppImage
,.deb
,.zip
- macOS:
The following are excluded from git to keep the repository lightweight:
node_modules/
out/
,.next/
,release/
(build outputs)*.dmg
,*.zip
,*.asar
(packaged artifacts).DS_Store
, log files
- Do not commit build artifacts or release files to git. This keeps the repository well under GitHub's 100MB file limit.
- If you need to further reduce app size, check for unused dependencies or assets.
For more details, see the scripts in the scripts/
directory.