Why JSPM and systemjs?

On many projects I’ve helped develop, I’ve spent countless hours obsessing over one small aspect of building a JS app-script loading. What is the best tool/approach to loading tens maybe hundreds of .js files into the browser? I tried all of them, regular script tags, $script.js, AMD, browserify, webpack, systemjs.

So to summarize why I have settled on JSPM/System.js:

  1. futureproof - aligned with system-loader spec
  2. natural to how JS has always worked — no hacks, no precompiling, load on demand? no problem, natively supported with a nice syntax
  3. easy-no special dev server needed
  4. extendable with plugins-those plugins will keep working with the native system loader of course
  5. cacheable- not bundling everything into one big file makes for much better caching scenarios. Imagine when you work on your app and change your bussines logic, but all libraries you use are not changed. With a medium sized team and CI in place, this could happen few times a day. When bundled, users have to download whole bundle again after each commit. Even though majority of the files in the bundle are unchanged. Whereas without bundles, they only download the changed files
  6. fast-even though you transpile in the browser, it won’t be a problem as long as you use hot load your changes

Check out my systemjs-hot-reloader project and it’s boilerplate projects. Get cracking.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.