Guy Bedford: Package Management for ES6 Modules [JSConf2014]

JSConf · 20K views · 2014 · 37:59

Open on YouTube

Web developmentSoftware architecture & designtalkdated

Why Stack Overflow recommends it

Stack Overflow users link it when answering questions about ES6 module loading, SystemJS and jspm, and about whether bundling is still needed.

Recommended by 2 people across 2 different months, 2014 to 2016.

What it is

Guy Bedford's 2014 JSConf talk introduces jspm and the ES6 Module Loader polyfill, explaining how ES6 modules could work in browsers before native support. It covers loading all existing module formats through one loader, offline production builds, a command-line package manager, and a CDN with server-push for install-free module loading.

What people said

Recommends artur grzesiak · 2014-11 · Stack Overflow · on “Modular JavaScript - are there any approaches apart CommonJS and AMD to consider?”

Take a look at systemJS [LINK] : Spec-compliant universal module loader - loads ES6 modules, AMD, CommonJS and global scripts. Designed as a collection of small extensions to the ES6 specification System loader, which can also be applied individually. Loads any module format, by detecting the format automatically. Modules can also specify their format with meta config. Provides comprehensive and exact replications of AMD, CommonJS and ES6 circular reference handling. Loads ES6 modules compiled into the System.register form for production, maintaining full circular references support. Supports RequireJS-style map, paths, bundles, shim and plugins. Tracks package versions, and resolves semver-

Recommends nickytonline · 2015-04 · Stack Overflow · on “ES6 module import and dependency management”

I think that jspm [LINK] is the solution your looking for. It will help you out without making file path assumptions when importing modules. It uses the SystemJS dynamic ES6 loader [LINK] . Watch the video that is posted on their site for a very good explanation on how it all works, Guy Bedford: Package Management for ES6 Modules [JSConf2014] [this video] .

Cites marianc · 2015-07 · Stack Overflow · on “What is the best way to distribute reusable JavaScript modules with dependencies?”

You may want to check jspm.io + SystemJS [LINK] which is a relatively new package manager and universal module loader which is increasing in popularity. Please find below some presentations and article on the subject I found useful: [LINK] , [LINK] , [this video] , [LINK]

Cites aaron-bond · 2016-07 · Stack Overflow · on “Is bundling my JS/TS project anti-pattern?”

I'm working on a project in Angular 2 using TypeScript and trying to nail-down my workflow. Yesterday, I saw this video [this video] from Guy Bedford about package management. In it, he makes mention of the fact that he considers bundling to be anti-pattern. I've seen similar mention of moving away from bundling on an angular-university guide [LINK] . From what I have read since watching the video, it seems to me that the reason for bundling being anti-pattern is that HTTP2 allows multiple responses per request [LINK] , sent in parallel. This seems pretty useful since a single request to your server could return the whole angular app in individual files. Is HTTP2 support now prevalent enough to t