Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27377] iOS: Disable minifying of Javascript source

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusIn Review
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterGary Mathews
AssigneeGary Mathews
Created2019-09-04T18:24:04.000+0000
Updated2020-07-13T15:32:24.000+0000

Description

- Production applications using ACA without source-maps will produce illegible crash reports due to minification of the source code. - Although minifying the source can reduce file size, the benefit for Titanium applications isn't significant like it is for web applications. - We should set minifying to false by default for both production and development deploy types.

Comments

  1. Gary Mathews 2019-09-09

    master: https://github.com/appcelerator/titanium_mobile/pull/11206
  2. Hans Knöchel 2019-09-10

    Is there any reason to disable this when ACA is not used? The benefits are also to harden the reverse engineering of client code and app size is a BIG thing for developers. I hope this can be fine-tuned to be only set if explicitly requested.
  3. Christopher Williams 2019-09-17

    I would suggest that perhaps we look into use of "alternate" source maps and retaining minification for production builds. Right now our source map support includes inlined original sources for iOS due to limitations of the Safari WebInspector resolving the original source files when debugging via Safari. There are options for us since we manually handle the source maps to a degree so we could significantly alter them, which may give us a balance that works (i.e. ACA stacks are meaningful to the line or line+column level, but we don't inline the original source) This is very much a trade-off - minifying source may not be much of a gain in terms of reducing app size, especially if we need to include source maps inline to make ACA relevant; but as Hans suggested, there's more to minification as it's generally also used to obfuscate source - and we do have plans to eventually do more significant minification based on dead code elimination/tree shaking (investigate rollup for the whole app, or inlining of constants/statics via https://github.com/appcelerator/babel-plugin-transform-titanium and then do dead code elimination of platform-specific branches for other platforms, etc).
  4. Ewan Harris 2020-07-13

    Linking related ticket which was a bug exposed via minification

JSON Source