build: enable bundle_dts for router package (#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 #28833
This commit is contained in:
parent
c866c11bf8
commit
29f57e315e
|
@ -10,6 +10,7 @@ ng_module(
|
|||
"src/**/*.ts",
|
||||
],
|
||||
),
|
||||
bundle_dts = True,
|
||||
deps = [
|
||||
"//packages/common",
|
||||
"//packages/core",
|
||||
|
|
|
@ -18,5 +18,7 @@ import {Component} from '@angular/core';
|
|||
* to this `EmptyOutletComponent`.
|
||||
*/
|
||||
@Component({template: `<router-outlet></router-outlet>`})
|
||||
export class EmptyOutletComponent {
|
||||
}
|
||||
export class ɵEmptyOutletComponent {
|
||||
}
|
||||
|
||||
export {ɵEmptyOutletComponent as EmptyOutletComponent};
|
||||
|
|
|
@ -7,6 +7,6 @@
|
|||
*/
|
||||
|
||||
|
||||
export {EmptyOutletComponent as ɵEmptyOutletComponent} from './components/empty_outlet';
|
||||
export {ɵEmptyOutletComponent} from './components/empty_outlet';
|
||||
export {ROUTER_PROVIDERS as ɵROUTER_PROVIDERS} from './router_module';
|
||||
export {flatten as ɵflatten} from './utils/collection';
|
||||
|
|
|
@ -7,6 +7,7 @@ exports_files(["package.json"])
|
|||
ng_module(
|
||||
name = "testing",
|
||||
srcs = glob(["**/*.ts"]),
|
||||
bundle_dts = True,
|
||||
deps = [
|
||||
"//packages/common",
|
||||
"//packages/common/testing",
|
||||
|
|
|
@ -12,6 +12,7 @@ ng_module(
|
|||
"src/**/*.ts",
|
||||
],
|
||||
),
|
||||
bundle_dts = True,
|
||||
deps = [
|
||||
"//packages/common",
|
||||
"//packages/core",
|
||||
|
|
Loading…
Reference in New Issue