webpack: http://webpack.github.io/ jspm: http://jspm.io/
Nice introduction presentation: http://peerigon.github.io/presentations/2014-07-09-MNUG-webpack/
The watch seems intelligent in that it might be tracing the dependency graph. In my test case it seems to, at least. AMD and CommonJS modules are supported out of the box. In my test I was unable to get es6-loader working (see commit in link below).
Unlike jspm, it's not a registry. Instead it resolves dependencies from node_modules (i.e. npm) by default (like browserify), although according to this tutorial it's trivial to configure which directories the module resolver should read from.
My test:
- "foo depends on bar"
- "foo depends on bar depends on x" (transitive dependency)
Both cases seemed to work with no problems. See my commit log: https://github.com/OliverJAsh/webpack-experiment/commits/master
You can configure webpack to recognise other files types (e.g. LESS, ES6) and do things with them (compile, load them (e.g. applying some CSS styles to the page)) with what they call "loaders". I quickly stumbled across a problem with this infrastructure: given "foo depends on bar depends on baz", where "baz" is an ES6 module, ideally "bar" should contain the configuration for handling its ES6 dependency (by configuring the es6-loader). In webpack however, all of the loaders must be defined by the consumer – they are not defined at the module level. So, the consumer of "foo" needs to know that "bar" contains an ES6 module ("baz"), and they must configure webpack to use the es6-loader.
IIRC, the above problem doesn't happen with jspm’s plugins. jspm-cli creates a config.js file for the consumer by traversing the dependency graph, at which point it will add the plugin as a path (because the plugin is defined as a dependency, e.g. https://github.com/guardian/developers-site/blob/56d25a69600e9bb67ddff8f56aaa7e23011647ba/package.json#L25). Therefore, the consumer is never concerned about the nature of transitive dependencies – they just work because jspm automatically aggregates all dependency and plugin information into config.js.
Generally speaking, I prefer the idea of polyfilling the future’s technology instead of writing hacks for today’s technology. Whilst webpack supports ES6 modules, it's not harnessing the ES6 Module Loader. I'm biased, but from my experience with webpack and jspm so far, I would say jspm is definitely much more intuitive, standard compliant, and well thought out.
Great writeup. I very much agree with your findings and have been through a similar experience myself.