我可以用angular2用webpack替换systemJS吗 [英] Can I replace systemJS by webpack with angular2

查看:132
本文介绍了我可以用angular2用webpack替换systemJS吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我了解到systemJS和webpack都在做同样的事情. 所以我想用webpack替换systemJS,但是当我在HTML页面中删除system.js脚本引用时,出现以下错误:

I understood that systemJS and webpack are doing the same. So I would like to replace systemJS by webpack but when I'm removing the system.js script reference in my html page I get the following error:

angular2.js:2 Uncaught ReferenceError: System is not defined

这是否意味着angular2正在将SystemJS用作模块加载器,而又无法将其替换为其他模块?

Does it means that angular2 is using SystemJS as module loader without the possibility to replace it by another one?

推荐答案

是的,可以.

示例和放大器;教程 .

例如:

  • https://github.com/preboot/angular2-webpack
  • https://github.com/AngularClass/angular2-webpack-starter
  • https://github.com/blacksonic/angular2-es6-starter (suggested by @blacksonic)

这篇关于我可以用angular2用webpack替换systemJS吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆