Navigation Menu

Skip to content

Commit

Permalink
perf(build): reduce minified code size (#1337)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmorehouse committed Nov 14, 2017
1 parent 714d748 commit 9d0ae3e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion build/build
Expand Up @@ -15,8 +15,10 @@ rollup -c build/rollup.config.esm.js
uglify=`pwd`/node_modules/.bin/uglifyjs
cd dist

# We use --mangle but not --compress to reduce file size
# --compress unfortunately removes the 'imports' from the top of hte ESM build
for f in *.js; do
o=`echo $f | sed s/\.js/.min.js/`
echo "$f ~> $o"
$uglify $f --source-map -o $o
$uglify $f --mangle --source-map -o $o
done

0 comments on commit 9d0ae3e

Please sign in to comment.