Skip to content

Commit

Permalink
Don't bundle large singular dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
indutny-signal committed Feb 28, 2022
1 parent 746f361 commit c30af00
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions scripts/esbuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,34 @@ const bundleDefaults = {
},
bundle: true,
external: [
// Native libraries
'@signalapp/signal-client',
'@signalapp/signal-client/zkgroup',
'backbone',
'better-sqlite3',
'electron',
'fs-xattr',
'fsevents',
'mac-screen-capture-permissions',
'ringrtc',
'sass',
'sharp',
'websocket',

// Things that don't bundle well
'backbone',
'got',
'jquery',
'mac-screen-capture-permissions',
'node-fetch',
'sass',
'pino',
'proxy-agent',
'ringrtc',
'sharp',
'websocket',
'electron',

// Large libraries (3.7mb total)
// See: https://esbuild.github.io/api/#analyze
'emoji-datasource',
'fabric',
'google-libphonenumber',
'moment',
'quill',

// Uses fast-glob and dynamic requires
'./preload_test',
Expand Down

0 comments on commit c30af00

Please sign in to comment.