The size of the exe packaged by forge is ridiculously large. I think this is caused by not using vite build to build the dist directory. Also, all dependencies of dependent libraries are packaged, without distinguishing between used and unused ones. #3420
Labels
Pre-flight checklist
Electron Forge version
7.1
Electron version
27.1
Operating system
win10
Last known working Electron Forge version
No response
Expected behavior
The dist directory built by forge using vite
Actual behavior
Hello, I used electron-forge to package the vite practice project into an exe. The dist directory built through npm run build is only 108kb. But the asar file built through electron-forge reaches 18mb. Is this because I haven't configured it? Or is this how the packager works, without using the dist directory built by vite.
The size of the exe packaged by forge is ridiculously large. I think this is caused by not using vite build to build the dist directory. Also, all dependencies of dependent libraries are packaged, without distinguishing between used and unused ones.
Steps to reproduce
none
Additional information
My project structure:
root
electron: Place main.js and preload.js of electron
src: Place the files of vue and main.js (vue).
index.html file
...
forge.config.js content
The text was updated successfully, but these errors were encountered: