在编译typescript后添加前缀以导入URL
我有一个angular2应用程序,我正在用打字脚本编写 我想知道是否有可能让typescript编译器为所有导入的URL添加前缀(和后缀) 例如,我得到了以下代码:在编译typescript后添加前缀以导入URL,typescript,angular,Typescript,Angular,我有一个angular2应用程序,我正在用打字脚本编写 我想知道是否有可能让typescript编译器为所有导入的URL添加前缀(和后缀) 例如,我得到了以下代码: import {AppComponent} from 'app.component'; 在javascript中编译成如下内容: System.register(['./test/app.component'], ... 但我想要的是: System.register(['<some_path>/test/app.c
import {AppComponent} from 'app.component';
在javascript中编译成如下内容:
System.register(['./test/app.component'], ...
但我想要的是:
System.register(['<some_path>/test/app.component.js'], ...
System.register(['/test/app.component.js']。。。
其中“some_path”可以是例如“component/my_app/”