Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
Fix #2254, build production versions of bundles (#3432)
Browse files Browse the repository at this point in the history
This always builds bundles as a production build. envify and uglifyify should also help improve overall bundle sizes
  • Loading branch information
ianb authored and jaredhirsch committed Aug 31, 2017
1 parent 10b7c0f commit 2450dc7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bin/build-scripts/bundle_dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ build() {
echo -n "Building $(basename $dest): deps... "
browserify --list -e "$@" | sed "s!$(pwd)/!!g" | grep -v build-time > "$(depfile)"
echo -n "bundle... "
browserify -o "$dest" \
NODE_ENV=production browserify -o "$dest" \
-g [ envify --NODE_ENV production ] \
-g uglifyify \
-e "$@"
if [[ -z "$NO_UGLIFY" ]] ; then
echo -n "minimizing... "
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"body-parser": "1.17.2",
"browserify": "14.4.0",
"david": "11.0.0",
"envify": "4.1.0",
"eslint": "4.3.0",
"eslint-plugin-mozilla": "0.4.2",
"eslint-plugin-promise": "3.5.0",
Expand All @@ -70,6 +71,7 @@
"sass-lint": "1.10.2",
"selenium-webdriver": "3.5.0",
"svgo": "0.7.2",
"uglifyify": "4.0.3",
"uglify-js": "3.0.26",
"web-ext": "1.10.1"
},
Expand Down

0 comments on commit 2450dc7

Please sign in to comment.