How to convert ES6 to ES5 in Cordova via a hook?

Asked

Viewed 73 times

1

Cordova’s crosswalk plugin does not work on iOS, so iOS Webview continues to be native. The problem is that native Webview (safari) does not run ES6, but my project is written in ES6.

I need a kind of recursive hook that converts all parts of my project into ES6 to ES5 from the command cordova emulate ios.

Obs1 I know there is a way to install Crosswalk manually in Cordova for iOS, but this alternative would break my project because this Webview is not the same as in Chrome and does not have certain Apis.

Obs2 My project does not use ES6 modules, only simpler Features: Arrow functions, object notations, template strings etc...

  • 1

    https://babeljs.io/

  • @bfavaretto Would you like to write a detailed answer on how to implement with a hook in Cordova? I have little experience with both.

  • I don’t have enough knowledge to answer either

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.