Skip to content

Commit 29f57e3

Browse files
alan-agius4kara
authored andcommitted
build: enable bundle_dts for router package (angular#28833)
This PR also changes the name of `EmptyOutletComponent` to `ɵEmptyOutletComponent`. This is because `ngcc` requires the node to retain the original name while dts bundler will rename the node is it's only exported using the aliases. Example typings files: ```ts declare class EmptyOutletComponent { } export {EmptyOutletComponent as ɵEmptyOutletComponent} ``` will be emitted as ```ts export declare class ɵEmptyOutletComponent { } ``` PR Close angular#28833
1 parent c866c11 commit 29f57e3

File tree

5 files changed

+8
-3
lines changed

5 files changed

+8
-3
lines changed

packages/router/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ ng_module(
1010
"src/**/*.ts",
1111
],
1212
),
13+
bundle_dts = True,
1314
deps = [
1415
"//packages/common",
1516
"//packages/core",

packages/router/src/components/empty_outlet.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,7 @@ import {Component} from '@angular/core';
1818
* to this `EmptyOutletComponent`.
1919
*/
2020
@Component({template: `<router-outlet></router-outlet>`})
21-
export class EmptyOutletComponent {
22-
}
21+
export class ɵEmptyOutletComponent {
22+
}
23+
24+
export {ɵEmptyOutletComponent as EmptyOutletComponent};

packages/router/src/private_export.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
*/
88

99

10-
export {EmptyOutletComponent as ɵEmptyOutletComponent} from './components/empty_outlet';
10+
export {ɵEmptyOutletComponent} from './components/empty_outlet';
1111
export {ROUTER_PROVIDERS as ɵROUTER_PROVIDERS} from './router_module';
1212
export {flatten as ɵflatten} from './utils/collection';

packages/router/testing/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ exports_files(["package.json"])
77
ng_module(
88
name = "testing",
99
srcs = glob(["**/*.ts"]),
10+
bundle_dts = True,
1011
deps = [
1112
"//packages/common",
1213
"//packages/common/testing",

packages/router/upgrade/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ ng_module(
1212
"src/**/*.ts",
1313
],
1414
),
15+
bundle_dts = True,
1516
deps = [
1617
"//packages/common",
1718
"//packages/core",

0 commit comments

Comments
 (0)