Add prefix to import urls after typescript compilation

I have an angular2 application that I am writing in typescript.

I am wondering if the typescript compiler can add a prefix (and postfix) to all imported URLs?

eg. I got the following code:

import {AppComponent} from 'app.component';

What compiles into something like this in javascript:

System.register(['./test/app.component'], ...

But I want:

System.register(['<some_path>/test/app.component.js'], ...

Where "some_path" can be, for example, "Component / my_app /".

+4
source share

All Articles