3 ms·
wait. Browserify is for package-management. For people who want to do node.js style requires in their browser. Closure Compiler is for optimization, it is to
by wrong_variable 11y ago
wait.
Browserify is for package-management. For people who want to do node.js style requires in their browser.
Closure Compiler is for optimization, it is to get rid of dead code.
Browserify is not optimized for performance. Why is this post surprising ?
- fenomas 11y agoThis confused me as well. The point of browserify is that it groks npm versions and wrangles your dependencies. Whether you want to transpile or uglify etc. is orthogonal to whether you need browserify/webpack, isn't it?
- draw_down 11y agoThere wouldn't be a bundle for Babel to transpile if the code wasn't Browserified first. I don't know much about Closure compiler but apparently it handles both the transpilation step and the bundling step.
- fenomas 11y agoI think that closure and other transpilers do "bundle", but only in the sense that they resolve explicit ES6 imports. They don't attempt to grok versions or dependencies the way browserify/webpack do.
- nailer 11y agoDoes closure compiler tree shake commonjs? If not, I'd rather stick with browserify than lose access to all of npm.