Skip to content

Commit 1bd1c12

Browse files
committed
trim bundle: sourcemaps, locales, sqlite sources
1 parent 0b25604 commit 1bd1c12

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

apps/code/electron-builder.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ const config: Configuration = {
2323
nodeGypRebuild: false,
2424
generateUpdatesFilesForAllChannels: true,
2525

26+
// English-only product: drop the ~50 other Electron locales (~50 MB).
27+
electronLanguages: ["en", "en-US"],
28+
2629
beforePack,
2730

2831
files: [
@@ -31,6 +34,11 @@ const config: Configuration = {
3134
"package.json",
3235
"!node_modules/**/*",
3336
...packagedFileGlobs,
37+
// Sourcemaps are uploaded to PostHog at build time, not consumed in the app.
38+
"!**/*.map",
39+
// better-sqlite3 ships its C amalgamation sources; only the built .node runs.
40+
"!node_modules/better-sqlite3/deps/**",
41+
"!node_modules/better-sqlite3/src/**",
3442
],
3543

3644
asarUnpack: [

0 commit comments

Comments
 (0)