Open clhenrick opened 8 years ago
I like Gulp because the config is written in JavaScript. I find this more intuitive, more flexible, and easier to debug than Webpack's JSON config. But, I don't feel strongly about it, and a lot of my preference comes from my lack of experience with Webpack.
I like Webpack because the configuration is less verbose and the tool provides sufficient functionality for practically anything we need to do.
I only feel weakly about it, and a lot of my preference comes from experience with poorly-written (and cargo culted) Gulp and Grunt configurations.
Webpack 2 is going to support tree shaking, among other things.
https://gist.github.com/sokra/27b24881210b56bbaff7 http://www.2ality.com/2015/12/webpack-tree-shaking.html https://docs.google.com/document/d/1tRc0MzvRdGK7EbG2LRW8vSyoxKhR_EvRUz3AQRyFZso/edit?pli=1
(from https://docs.google.com/document/d/1tRc0MzvRdGK7EbG2LRW8vSyoxKhR_EvRUz3AQRyFZso/edit?pli=1)
add “es6:main” field as default package main
This addresses the need to babelify before npm publish
From what I read, those are still a little too future-looking as well as being annoyingly slow.
Looks like it's possible to apply Rollup as a Browserify transform (and therefore get tree-shaking): https://github.com/nolanlawson/rollupify
Based on the description, though, I'm not sure it would tree-shake dependencies. Maybe?
EDIT: looks like it probably does hit deps, actually, since this example shows how to explicitly exclude node_modules
.
Does it matter that the React Redux community seems to prefer webpack? Wondering if that will be very influential (or not) in the future of how these tools develop.
Should we decide on one? Does it really matter?