In DCC, exports are currently resolved and substituted at compile time just like imports. The only re-export exposed to JS is the main() method.
We should add library level annotations specifying that a library should be fully re-exported to JavaScript to give authors the option of fully exporting certain libraries to JS. In the future, this annotation could impact dart2js codegen as well, exposing the full contents of the specified libraries to JS.
Background: DDC previously attempted to expose all re-exported members to JS but the code was never used internally by DDC so had bugs (JS interop was broken and top level fields behavior was incorrect). Additionally, exposing all exports to JS even though they were never used by Dart code resulted in 6.5% larger code for typical Angular2 applications.
In DCC, exports are currently resolved and substituted at compile time just like imports. The only re-export exposed to JS is the main() method.
We should add library level annotations specifying that a library should be fully re-exported to JavaScript to give authors the option of fully exporting certain libraries to JS. In the future, this annotation could impact dart2js codegen as well, exposing the full contents of the specified libraries to JS.
Background: DDC previously attempted to expose all re-exported members to JS but the code was never used internally by DDC so had bugs (JS interop was broken and top level fields behavior was incorrect). Additionally, exposing all exports to JS even though they were never used by Dart code resulted in 6.5% larger code for typical Angular2 applications.