问题
I have went through couple of module loaders for JavaScript & Angular JS 1 AMD, requireJS, Browserify, JSPM, Webpack, SystemJS, CommonJS. Which one is the best module loader to use with angular 2 ?
回答1:
Just like in angularJs, it doesn't really matter which loader you want to use for angular2. Whatever worked fine for you in angularJs, will just work as fine in angular2. The same rules apply to all loaders considering speed and flexibility.
There is no need to be inclined to use SystemJs, just because angular2 uses it as an example in their quickstart.
回答2:
ES6 module syntax support with systemjs and jspm
As PierreDuc said it really doesnt matter what loader you use as long as you have to take care of existing modules before the ES6 module snytax was introduced.
But with the introduction of the module syntax in ES6 you can start to use standard-compliant ES6 package control syntax.
By using SystemJs and jspm ES6 module syntax is supported standard-compliant.
See also Choose ES6 modules Today! by Cody Lindley .
来源:https://stackoverflow.com/questions/35912855/best-module-loader-for-angular-2