fix(bazel): don't inline tslib into fesms (#23044)

PR Close #23044
This commit is contained in:
Alex Eagle 2018-03-28 09:19:00 -07:00 committed by Alex Rickabaugh
parent 4e004f3783
commit 00497437a6
2 changed files with 9 additions and 1 deletions

View File

@ -122,6 +122,11 @@ describe('@angular/core ng_package', () => {
it('should not be processed by tsickle', () => {
expect(shx.cat('fesm5/core.js')).not.toContain('@fileoverview added by tsickle');
});
it('should load tslib from external bundle', () => {
expect(shx.cat('fesm5/core.js')).not.toContain('function __extends');
expect(shx.cat('fesm5/core.js')).toMatch('import {.*__extends');
});
});

View File

@ -45,7 +45,7 @@ def ng_module(name, tsconfig = None, entry_point = None, **kwargs):
entry_point = "public_api.ts"
_ng_module(name = name, flat_module_out_file = name, tsconfig = tsconfig, entry_point = entry_point, **kwargs)
def ng_package(name, readme_md = None, license_banner = None, **kwargs):
def ng_package(name, readme_md = None, license_banner = None, globals = {}, **kwargs):
if not readme_md:
readme_md = "//packages:README.md"
if not license_banner:
@ -55,6 +55,9 @@ def ng_package(name, readme_md = None, license_banner = None, **kwargs):
name = name,
readme_md = readme_md,
license_banner = license_banner,
globals = dict(globals, **{
"tslib": "tslib"
}),
replacements = PKG_GROUP_REPLACEMENTS,
**kwargs)