When comparing Component vs JSPM, the Slant community recommends JSPM for most people. In the question“What are the best open source front-end package managers?” JSPM is ranked 4th while Component is ranked 10th. The most important reason people chose JSPM is:
JSPM is registry agnostic, it can pull packages from npm and github and is built in such a way it can support more.
Ranked in these QuestionsQuestion Ranking
Pros
Pro Vertically integrated with the build process
Component handles more than just package management; it also deals with the build process and bundling, so you don't have to find and manage a separate solution. This lets you get up and running faster with less to worry about.
Pro Also manages non javascript components
Components can be html snippets or css in addition to Javascript, and are treated as first class objects by being converted into Javascript modules that load styles and markup as strings.
Pro Components are more structured and thus have more inter-compatibility
Components can be javascript, style and markup, they are bundled in a way that makes it possible to load in entire UI chunks. This means less flexibility, but the components that are available are easier to work with.
Pro Designed with ES6 modules and Web Components in mind
Component is designed as a current-day solution for the currently proposed ES6 modules and Web Components, making it more in-line with the direction the web is going in the future.
Pro Encourages simpler and smaller components
Components are encouraged by convention to be small and single-use, meaning that the packages in the community's ecosystem are easier to use and combine together. More complex components use dependency resolution to compose smaller components so that components stay limited in scope.
Pro Easy dependency management
Component provides you with a flat dependency tree. This results in easy dependency management. A flat dependency tree is important for file size optimization, so you don't end up loading multiple copies of the same library, or deeply nested dependencies that bloat up.
Pro Registry agnostic
JSPM is registry agnostic, it can pull packages from npm and github and is built in such a way it can support more.
Pro Module style agnostic
Loads ES6, AMD, CommonJS and globals.
Pro Can transcompile ES6, JSX and Typescript
Pro Much faster than Webpack or Browserify
While Webpack and Browserify recompile the source code using Babel, jspm is the only packager that can load prebuild/minified code downloaded from the npm registry.
Pro Bundled based on imported modules without any config
Create the bundle file without config and add only the modules imported.
Pro Switch between async or sync load
With a simple command you could change between load the modules async by systemjs or sync with a bundle file.
Pro Easy install packages from npm, github or any git repository
Pro Versioned package urls
It creates a packages folders which are versioned. This makes it future proof for a time where we stop bundling all the code. In the following presentation Guy Bedford calls bundling an anti-pattern.
Pro Very easy to start with
Cons
Con No longer maintained
Component is no longer being developed/maintained, so there will be no new features or bug fixes.
Con Cannot add modules that are not on Github
While using Github as a backend database for Component makes things a lot easier, as there's no need to add other authorization credentials to use modules, it means that modules that aren't on Github cannot be added.
Con You need to be an expert to write shims
You can load any module. But that comes with the price:
you need to find or write configs to load a particular rare module.
Con Doesn't hide complexity
JSPM doesn't try to hide complexity from the user. I.e. when some issue emerges you need understand a lot to be able to patch it or create a workaround.
Con Watcher has bugs
Watching would benefit from improvements
Con Unstable API
0.17 is still in beta. 0.16 is lacking features.
Con Poor bundler performance
Bundling performance is slow, though offset by the fact that bundling is not required during development, since it can load dependencies asynchronously.