docs/en/using-electron-packager.md
electron-packagerAll builds produced by electron-packager can be found within the build folder.
Please know that not all Operating Systems can build for all other platforms.
npm run build
Platforms include darwin, mas, linux and win32.
# build for darwin (macOS)
npm run build:darwin
Delete all builds from build.
npm run build:clean
If you are wanting to build for Windows with a custom icon using a non-Windows platform, you must have wine installed. More Info.
Further customization can be made at .electron-vue/build.config.js in accordance to electron-packager's options found here. The name applied to your built application is set with the productName value in your package.json.
{
// Target 'x64' architecture
arch: 'x64',
// Compress app using 'electron/asar'
asar: true,
// Directory of the app
dir: path.join(__dirname, '../'),
// Set electron app icon
// File extensions are added based on platform
//
// If building for Linux, please read
// https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#icon
icon: path.join(__dirname, '../build/icons/icon'),
// Ignore files that would bloat final build size
ignore: /(^\/(src|test|\.[a-z]+|README|yarn|static|dist\/web))|\.gitkeep/,
// Save builds to `builds`
out: path.join(__dirname, '../build'),
// Overwrite existing builds
overwrite: true,
// Environment variable that sets platform
platform: process.env.BUILD_TARGET || 'all'
}