Ts-loader: Why we need babel if we can use `tsc` to convert `es6` to `es5`?

Created on 13 May 2017  路  1Comment  路  Source: TypeStrong/ts-loader

As my understanding, I can use tsc to convert es6 to es5. The only constraint is that the file extension of the script to be converted must be .ts or .tsx.
Can ts-loader provide an option so that we can convert .js file by using tsc?
By doing so, I can no longer need to install too many devDependences modules of babel.

Most helpful comment

Babel is necessary if you want to polyfill new APIs like Promise, Map etc. If you don't use those then you don't need babel

>All comments

Babel is necessary if you want to polyfill new APIs like Promise, Map etc. If you don't use those then you don't need babel

Was this page helpful?
0 / 5 - 0 ratings