0
I’m doing a project (App on JS
+ Cordova
), and I came across a problem using let
, const
, arrow function
and etc (Only works in more modern devices, such as, Android 6+
or IOS 10+)
.
So I was wondering if it’s possible to use the Babel
via CDN, or otherwise, because, until then, I didn’t find much talking about using it, that way.
If you use Cordova you have a Node.js pipeline right? it would be better to join Babel there, to compile Javascript. Cordova certainly has something configurable for this.
– Sergio
@Sergio Would that be? https://github.com/kerrishotts/cordova-plugin-webpack-transpiler
– Rafael Augusto
Probably this one does. But there may be another(s) that use Babel directly, without the webpack. The webpack gives you more functionality if you need it in the future. This plugin seems unpopular yet.
– Sergio
You can probably also compile JS separately from Cordova and tell Cordova to fetch the compiled file.
– Sergio