我知道 systemJS 和 webpack 也在做同样的事情。
所以我想用 webpack 替换 systemJS,但是当我删除 html 页面中的 system.js 脚本引用时,出现以下错误:
angular2.js:2 Uncaught ReferenceError: System is not defined
这是否意味着 angular2 正在使用 SystemJS 作为模块加载器,而无法用其他加载器替换它?
是的你可以。
很少有示例和教程 https://www.google.com/?q=using%20webpack%20with%20angular.
例如:
- https://github.com/preboot/angular2-webpack https://github.com/preboot/angular2-webpack
- https://github.com/AngularClass/angular2-webpack-starter https://github.com/AngularClass/angular2-webpack-starter
-
https://github.com/blacksonic/angular2-es6-starter https://github.com/blacksonic/angular2-es6-starter(建议来自@blacksonic https://stackoverflow.com/users/1725325/blacksonic)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)