You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 16, 2020. It is now read-only.
0.2.0 consumes 20 seconds of precious developer time on default settings (unfortunately, I had to use cheap-module-source-map and turn off the devtool: 'source-map' setting because of the weird bug #68).
Bundling with UglifyJSPlugin takes 2 seconds with "generator" settings (mangle and compress equals false), and 8 seconds on maximum settings (with compress: { passes: 2 }).
Bundling the same code with webpack without any minifiers, then passing the generated bundle to the babylon parser, and printing the resulting AST with @babel/generator takes 3 seconds.
The "generator" settings are very important nowadays, when everything can be gzipped and sent over HTTP/2.
The fancy ES Modules do have unsolvable problem of race conditions on updates, so bundling will be always actual and necessary on serious deployments with high loads.
One interesting philosophy is "code isomorphism between production and development environment" which encourages developers to work with and debug the same code which clients finally use.
To simplify debugging of production bundles, use of variables mangling and compression (which may flatten nested function calls etc.) should be avoided. Such simple minification setting improves the speed of bundle code generation, which is great.
I was expecting that the plugin may do its work very fast, but even was unable to disable the mangle setting.
The text was updated successfully, but these errors were encountered:
This issue is not related to this webpack plugin. I'll close this here. We are already working on improving babel-minify's performance and babel-7 upgrade. Feel free to open issues in babel-minify repository for babel-minify related issues.
Minification sample:
@angular/core
.0.2.0 consumes 20 seconds of precious developer time on default settings (unfortunately, I had to use
cheap-module-source-map
and turn off thedevtool: 'source-map'
setting because of the weird bug #68).Bundling with
UglifyJSPlugin
takes 2 seconds with "generator" settings (mangle
andcompress
equalsfalse
), and 8 seconds on maximum settings (withcompress: { passes: 2 }
).Bundling the same code with webpack without any minifiers, then passing the generated bundle to the
babylon
parser, and printing the resulting AST with@babel/generator
takes 3 seconds.The "generator" settings are very important nowadays, when everything can be gzipped and sent over HTTP/2.
The fancy ES Modules do have unsolvable problem of race conditions on updates, so bundling will be always actual and necessary on serious deployments with high loads.
One interesting philosophy is "code isomorphism between production and development environment" which encourages developers to work with and debug the same code which clients finally use.
To simplify debugging of production bundles, use of variables mangling and compression (which may flatten nested function calls etc.) should be avoided. Such simple minification setting improves the speed of bundle code generation, which is great.
I was expecting that the plugin may do its work very fast, but even was unable to disable the
mangle
setting.The text was updated successfully, but these errors were encountered: