当VS使用tsc.exe --module System进行编译时,如何导入TypeScript 3?

时间:2019-01-04 19:10:19

标签: typescript typescript3.0

如果我有这样的TypeScript导入:

 import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

然后我将VS设置为使用CommonJS,这样就调用了tsc.exe:

tsc.exe --module CommonJS ...blah..

它工作正常。

如果我将VS设置为使用系统,则tsc.exe的调用方式如下:

tsc.exe --module System ...blah...

我得到一个错误

  

错误TS2307(TS)找不到模块'@ angular / platform-b​​rowser-dynamic'

我需要怎么做才能让TS查找文件?我是否更改导入代码行的结构?是否在某个地方的配置文件中设置一些基本路径或目录?

0 个答案:

没有答案