Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-26146

Enable ES6 transpile/polyfill by default


    • Type: Improvement
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Release 8.0.0
    • Component/s: None
    • Labels:


      We want to guarantee support for all ES6 syntax, functions, and types on all platforms (Android, iOS, Windows) and all supported OS versions by Titanium 8.0.0. This way, all CommonJS modules built for Titanium 8.0.0 can be written in ES6. This also means we need to drop support of our "tiapp.xml" <transpile/> setting so that it cannot be turned off.

      Currently, CommonJS modules have to be written for ES5 since transpile/polyfill can be disabled by an app. This also means that they can't provide APIs that use promises, especially since iOS 9 doesn't natively support them. (A module could document that it only supports ES6 enabled apps, but this is inconvenient.)

      Issues to be resolved:

      • Babel is currently injecting 'use strict' into all JS files, which is a breaking change for app developers that don't adhere to this setting. (This is why transpile/polyfill is off by default.)
      • We need a mapping file so that a runtime error's stack trace would lineup with the app developer's code. We currently log the trace and display the trace via an alert. We need to consider online crash reporting as well. (Do we add the mapping file to the app bundle for non-production builds?)
      • Anything else?


          Issue Links



              • Assignee:
                cwilliams Christopher Williams
                jquick Joshua Quick
                Ewan Harris
              • Watchers:
                8 Start watching this issue


                • Created:

                  Backbone Issue Sync

                  • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                    Git Source Code