【问题标题】:If I use TypeScript to create ES5 script, do I need a traceur script tag in my html?如果我使用 TypeScript 创建 ES5 脚本,我的 html 中是否需要一个 traceur 脚本标签?
【发布时间】:2015-09-01 02:30:09
【问题描述】:

我正在使用 TypeScript 1.5 为一个简单的 angular2 应用程序生成 ES5 脚本。

我是否需要在我的 index.html 文件中同时包含引用模块加载器(例如 SystemJS)的脚本元素和引用 traceur(例如下面的)的脚本元素?

<script src="https://github.jspm.io/jmcriffey/bower-traceur-runtime@0.0.91/traceur-runtime.js"></script>
script src="https://jspm.io/system@0.16.js"></script>

...或者我只需要 SystemJS 的脚本元素?

【问题讨论】:

  • 我没有跟上,但看来您仍然需要它。请参阅here,因为他们仍然使用一些 traceur polyfill。但是,根据您的使用情况,您可能会不使用它。

标签: typescript angular traceur systemjs


【解决方案1】:

不,据我所知,traceur 仍然是 angular2 的依赖项。但是有一个问题要删除它,因此将来有可能。如果您想跟踪进度,请Here you can find the issue

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-09-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-05-29
    • 1970-01-01
    • 2017-11-14
    • 1970-01-01
    相关资源
    最近更新 更多