Skip to content

Commit f56042a

Browse files
authored
docs(recipes): add recipe for multi platform build
1 parent 59fe333 commit f56042a

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

docs/guide/recipes.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,3 +383,23 @@ Run the `Electron: All` launch configuration. Execution should stop upon reachin
383383
:::warning
384384
Breakpoints will not be detected in your Vue app during the initial launch of Electron. Reload the window to stop on these breakpoints.
385385
:::
386+
387+
## Multi Platform Build
388+
389+
> To build your app for platforms other than your dev system
390+
391+
By default, electron-builder builds for current platform and architecture. However, you can use the electron-builder CLI to create builds for other platforms ([more info here](https://www.electron.build/multi-platform-build)).
392+
393+
All arguments passed to the `electron:build` command will be forwarded to the electron-builder. Available arguments are [here](https://www.electron.build/cli). To set the platforms to build for, add them as a CLI arg to the `electron:build` command, optionally followed by the installers you want to build for that platform.
394+
395+
#### Example
396+
397+
To build a .deb installer for Linux and a NSIS installer for Windows:
398+
399+
Using npm:
400+
401+
`npm electron:build -- --linux deb --win nsis` (Do not remove the extra double dashes)
402+
403+
Using yarn:
404+
405+
`yarn electron:build --linux deb --win nsis`

0 commit comments

Comments
 (0)