3 ms·
This is also a decent path to take before fully migrating to Typescript and get type checking :) Does anyone know if you can use ES6 code side by side with ES5
by seivan 11y ago
This is also a decent path to take before fully migrating to Typescript and get type checking :)
Does anyone know if you can use ES6 code side by side with ES5 without any issues?
- paublyrne 11y agoYou will need to use Babel or another processor for the newer syntax and features, which will compile you ES5ish JavaScript that browsers will mostly understand. Compiling JavaScript is one solution to the problem that you have no control over the client interpreter and the 'version' of your code that it supports. It isn't an ideal solution, but it means we can move the language forward without worrying about breaking everything.
- seivan 11y agoThanks, I actually found a decent way to work with Webpack and Typescript, still figuring out how to import files/modules and use JS code from TS.