digidem / comapeo-desktop

GNU General Public License v3.0
2 stars 0 forks source link

fix build configuration for packaged app #22

Open achou11 opened 2 months ago

achou11 commented 2 months ago

Extracted from https://github.com/digidem/comapeo-desktop/pull/18. That PR introduces changes that generally work fine in development, but when building the archive we run into some issues.

Currently, when packaging the app, all packages that are specified as deps are copied over into the packaged application (and live in the node_modules directory). this is built-in behavior of the vite plugin and as of right now, there is no way to change this (see https://github.com/electron/forge/issues/3570). this results in a rather bloated package size because it essentially copies over a good portion of the node_modules directory into the archive when it's not necessary to do so. We'll need to adjust the vite configuration to account for this (which was originally mostly taken from a template that they provide, with some adjustments based on issues i found):