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

TiAPI: Ship baseline polyfills in built SDK

    Details

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

      Description

      As part of our ES6/7/8 support we now use babel transpilation via preset-env and polyfills. Currently, we are injecting polyfills based on usage during the transpiration process. The avoids unnecessary polyfills, but may lead to the same polyfills being required across many files.

      We can potentially move the polyfills into the app bootstrapping core js code we ship in the SDK itself so that the polyfills are required only once at startup.

      Pros:

      • potential speed boost when making use of polyfills by only loading them once (though also a potential startup perf hit!)
      • make use of polyfills in our core js bootstrap code
      • remove special polyfill copying done in node-titanium-sdk during app builds

      Cons:

      • shipping polyfills twice in built SDK right now (under node-titanium-sdk and in the bootstrap code) - can be fixed by removing from node-titanium-sdk
      • no gain (but instead a perf hit!) if these polyfills are't actually being used

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cwilliams Christopher Williams
                Reporter:
                cwilliams Christopher Williams
                Tester:
                Samir Mohammed
              • Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  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