accessibility-developer-tools icon indicating copy to clipboard operation
accessibility-developer-tools copied to clipboard

Make it possible to strip goog.export* usages

Open ewinslow opened this issue 9 years ago • 1 comments

I'm attempting to include this project in a new framework I'm building to automatically run accessibility checks whenever the UI updates. However, I want it to be completely stripped out for a production build. Unfortunately, the calls to goog.exportSymbol and such are preventing me from doing that.

Any chance we can get these moved to @export annotations so that the code will only be exported with the compiler flags set appropriately?

Another idea I had would be to wrap the exports in a compile-time flag so that I can turn this flag off and strip them out if they're not needed.

ewinslow avatar Mar 23 '16 21:03 ewinslow

Impact on size is about 13k after gzip, which is pretty substantial. For my app currently, numbers are 18647 bytes with adt included, 5053 after removing adt.

Another idea: have a separate file with all the exportSymbol calls that is used to generate the binary, but excluded for apps including it as a direct dependency.

ewinslow avatar Mar 23 '16 21:03 ewinslow