pingze
pingze

Reputation: 1049

How to use 'Electron-forge package' without copy source code?

When I use electron-forge package,it create a dir '/out', like below: out/ - appname-forge-win32-x64/ - - locales/ - - resources/ - - - app/ - - - electron.asar In dir app are my source code。It is sure that I can run .exe without them. How to configure electron-forge, that I can package without copying source code?

Upvotes: 2

Views: 6325

Answers (1)

deanz
deanz

Reputation: 166

add this in package.json

"build": {
"asar": true,
}

after packaging, it will convert your source code into .asar file

out/
- appname-forge-win32-x64/
- - locales/
- - resources/
- - - app.asar
- - - electron.asar

Upvotes: 5

Related Questions