-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not as optimized for Browserify as it could be. #29
Comments
Good insight! I 100% failed to notice this. Luckily if we modify the code to fix this, then some of the benchmark code should already run faster, since I know a few of them are build with Browserify (e.g. PouchDB is). |
This was referenced Oct 31, 2016
nolanlawson
pushed a commit
that referenced
this issue
Nov 2, 2016
* Fix for #7: Not as optimized for Webpack as it could be. Adds ability to wrap functions that are elements of an array literal in an argument list * Added a few negative case tests in response to code review. * Modified the array literal logic to very specifically track with webpack patterns rather than all array literal function parameters. * Added optimization of browserify modules. * Refactor of browserify and webpack logic.
Should this be closed due to #36? |
yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the vein of #7, I think optimize-js also doesn't work optimally for Browserify.
Whereas Webpack wraps modules in function expressions that are elements in an array, Browserify wraps modules in function expressions that are elements in an array which is in turn a value in an object with numeric keys, something like this:
I noticed in making my patch for #7 and testing on The Cost of Small Modules benchmark repo that optimize-js had essentially no effect on the Browserify bundles, and I'm pretty sure this is why.
The text was updated successfully, but these errors were encountered: