angular-cn/packages/platform-browser
Rado Kirov 294e56d529 refactor(platform-browser): Hoist functions to workaround optimization bug. (#32230)
Technically, function definitions can live anywhere because they are
hoisted. However, in this case Closure optimizations break when exported
function definitions are referred in another static object that is
exported.

The bad pattern is:
```
exports const obj = {f};
export function f() {...}
```

which turns to the following in Closure's module system:
```
goog.module('m');

exports.obj = {f};

function f() {...}
exports.f = f;
```

which badly optimizes to (note module objects are collapsed)
```
var b = a; var a = function() {...};  // now b is undefined.
```

This is an optimizer bug and should be fixed in Closure, but in the
meantime this change is a noop and will unblock other changes we want to
make.

PR Close #32230
2020-02-25 13:12:27 -08:00
..
animations test: disable broken saucelabs tests with “fixme-saucelabs-ivy” & “fixme-saucelabs-ve” tags (#35516) 2020-02-24 17:27:21 -08:00
src refactor(platform-browser): Hoist functions to workaround optimization bug. (#32230) 2020-02-25 13:12:27 -08:00
test test: setup circular dependency tests for all entry points (#34774) 2020-01-23 11:36:40 -08:00
testing refactor(platform-browser): avoid mutable exports. (#34207) 2019-12-05 10:19:12 -08:00
BUILD.bazel build: add npm_integration_test && angular_integration_test (#33927) 2020-02-24 08:59:18 -08:00
PACKAGE.md docs: add platform to glossary (#30731) 2019-06-12 11:46:25 -07:00
index.ts
package.json build: set up all packages to publish via wombot proxy (#33747) 2019-11-13 11:34:33 -08:00
public_api.ts