TypeScript can globally target different versions of Javascript - you can switch between transpiling ES3, ES5 or ES6.
We have to support IE, so ES3 is our lowest common denominator.
However, good browsers (like Chrome) already support ES6, and will be able to run the significantly smaller ES6 code with optimisations.
So, from the same TypeScript source I want to serve ES3 to IE and ES6 to Chrome.
Is there a way to make TypeScript transpile multiple JS files (maybe as
*.es3
and*.es6
or something like that) so we can pick which version to serve? (Ideally in VS 2015)Alternatively in C# can I access the TypeScript transpiler to complete the step at run time?