oei
oei

Reputation: 571

How to append file extensions .js to typescript?

In typescript I write the path without the extension -

import SomeClass from './some-class';  

How to make after compilation, these paths contain an extension .js ? Builds the project using gulp-typescript.

Upvotes: 0

Views: 226

Answers (1)

basarat
basarat

Reputation: 276125

these paths contain an extension .js

You don't need to. Runtime systems (e.g. node, requirejs, systemjs) automatically assume a .js extension if you require a js file.

Upvotes: 1

Related Questions