Skip to content

Use source-map@^0.5.0 and optimize bundle builds#2425

Merged
sebmck merged 2 commits intobabel:masterfrom
zertosh:browserify-shrink
Sep 24, 2015
Merged

Use source-map@^0.5.0 and optimize bundle builds#2425
sebmck merged 2 commits intobabel:masterfrom
zertosh:browserify-shrink

Conversation

@zertosh
Copy link
Member

@zertosh zertosh commented Sep 23, 2015

This PR should be merged simultaneously with #2424, so there aren't multiple versions of source-map installed. Notable changes include:

  • Builds are run through derequire and bundle-collapser. So they're smaller and safe to rebundle (if that's your thing).
  • Minified files are compressed and mangled – that's something you have to specify in the CLI.
  • Added a minified version of the node bundle. I ran some quick tests and using that instead of babel-core shaves 2 seconds off my builds. But, it does mean that the package then has another 860K to carry around. Feel free to remove this if you want
  • Switched all the flags to their long-form so you know what they do. Also turned on bash debugging (set -x) as a poor-man's progress indicator.
before after file
2.1M 1.9M browser.js
1.3M 871K browser.min.js
12K 12K external-helpers.js
8.7K 5.7K external-helpers.min.js
2.0M 1.9M node.js
n/a 860K node.min.js
151K 135K polyfill.js
103K 55K polyfill.min.js

@zertosh zertosh changed the title Browserify shrink DON'T MERGE YET Use source-map@^0.5.0 and optimize bundle builds Sep 24, 2015
@zertosh
Copy link
Member Author

zertosh commented Sep 24, 2015

Oh, the reason for doing this now is because of mozilla/source-map#205 – they dropped their AMD wrapper thing so running bundle-collapser doesn't break it.

sebmck added a commit that referenced this pull request Sep 24, 2015
Use source-map@^0.5.0 and optimize bundle builds
@sebmck sebmck merged commit 55989d1 into babel:master Sep 24, 2015
@zertosh zertosh deleted the browserify-shrink branch September 26, 2015 21:12
This was referenced Nov 5, 2015
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 8, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants