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.
- 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
- 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