You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Simply adding the package increases the build size by about 15 MB. It seems like the package drags along dev-only packages into production as part of node_modules. This negatively influences both the build size and the startup time.
To Reproduce
Steps to reproduce the behavior:
Create a new Electron Forge + Vite project with npm init electron-app@latest my-new-app -- --template=vite-typescript
Run yarn package. Observe the resources in the build being around 200 KB in size.
Run yarn add @capacitor-community/electron then yarn package. Observe the resources in the build being around 15 MB in size.
Expected behavior
Since this package is basically a helper to glue Capacitor and Electron together, it shouldn't have any actual influence on the resulting build. Pretty much the only things normally used in runtime from the entire package are two lines:
Describe the bug
Simply adding the package increases the build size by about 15 MB. It seems like the package drags along dev-only packages into production as part of node_modules. This negatively influences both the build size and the startup time.
To Reproduce
Steps to reproduce the behavior:
npm init electron-app@latest my-new-app -- --template=vite-typescript
yarn package
. Observe theresources
in the build being around 200 KB in size.yarn add @capacitor-community/electron
thenyarn package
. Observe theresources
in the build being around 15 MB in size.Expected behavior
Since this package is basically a helper to glue Capacitor and Electron together, it shouldn't have any actual influence on the resulting build. Pretty much the only things normally used in runtime from the entire package are two lines:
Desktop (please complete the following information):
Additional context
Same happens when an Electron project is created with
npx cap add @capacitor-community/electron
.The text was updated successfully, but these errors were encountered: