Skip to content

Commit

Permalink
fix(Build): Do not use compression withing binary
Browse files Browse the repository at this point in the history
  • Loading branch information
nokome committed Jun 21, 2021
1 parent 0105b6a commit c0517d4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
set -e

# Build binaries (see `pkg` in `package.json` for details)
npx pkg --out-path bin --compress Brotli .
# The `--compress Gzip` option reduced binary size from ~340Mb
# to ~146Mb but the `x86_64-unknown-linux-gnu.tar.gz` etc files
# was actually slightly larger. Brotli compression does not
# offer much further advantage and is verrrry slow to compress.
# Given that the `--compress` option can reduce startup times
# and offers little / no advantage for download sizes it is
# not enabled.
npx pkg --out-path bin .

# Zip binaries with renaming appropriate to the platform
cd bin
Expand Down

0 comments on commit c0517d4

Please sign in to comment.