[TIMOB-27629] Webpack: Add common JS sources as entry point
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | None |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 9.0.0 |
Fix Version/s | n/a |
Components | Tooling |
Labels | n/a |
Reporter | Jan Vennemann |
Assignee | Jan Vennemann |
Created | 2019-11-26T14:30:38.000+0000 |
Updated | 2019-11-26T14:36:17.000+0000 |
Description
Currently we pre-bundle our common JS sources with Rollup and transpile them with Babel to the minimum supported platform JS runtime. This also includes all polyfills required for that runtime. However, on iOS the user can increase the minimum deployment target for their app. This results in unnecessary polyfills being included in our commons JS bundle.
With Webpack it will would be possible to transpile our common JS sources for each app project individually, respecting the minimum iOS deployment target configured by users in their
tiapp.xml
. Our common JS sources and the user's code would then only include the polyfills actually required for the target JS runtime.
[~gmathews], here is the ticket related to our recent conversation about Android snapshots. While writing this ticket i realized that your snapshotting work on Android might not be an issue at all. Please correct me if i'm wrong, but on Android we are locked on a specific V8 runtime anyway. Only on iOS it possible to change the JS runtime (JavaScriptCore) because it is shipped with iOS. Is this correct? This would mean there is only a use case for iOS app to dynamically include polyfills based on the minimum deployment target of the app.