Best module loader for angular 2? [closed]

百般思念 提交于 2019-12-22 08:46:41

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!