stamen / panorama-template

Template / boilerplate for using stamen/panorama components, in a tasty React/Redux/React-Router shell
ISC License
2 stars 1 forks source link

Gulp vs. Webpack #4

Open clhenrick opened 8 years ago

clhenrick commented 8 years ago

Should we decide on one? Does it really matter?

ericsoco commented 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.

mojodna commented 8 years ago

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.

mojodna commented 8 years ago

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

mojodna commented 8 years ago

(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

ericsoco commented 8 years ago

Should we also be talking about jspm + SystemJS?

mojodna commented 8 years ago

From what I read, those are still a little too future-looking as well as being annoyingly slow.

ericsoco commented 8 years ago

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.

clhenrick commented 8 years ago

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.