Skip to content

Commit 55a8033

Browse files
clydinmgechev
authored andcommitted
fix(@schematics/angular): enable tsickle for library compilation
This is required to support forward references in ES2015 target code. tsickle provides the constructor parameter downlevel logic that removes the runtime TDZ error that would otherwise be encountered.
1 parent a552d30 commit 55a8033

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

packages/schematics/angular/library/files/tsconfig.lib.json.template

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
]
1313
},
1414
"angularCompilerOptions": {
15+
"annotateForClosureCompiler": true,
1516
"skipTemplateCodegen": true,
1617
"strictMetadataEmit": true,
1718
"fullTemplateTypeCheck": true,

packages/schematics/angular/library/index.ts

+5
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,11 @@ function addDependenciesToPackageJson() {
103103
name: 'ng-packagr',
104104
version: '^5.1.0',
105105
},
106+
{
107+
type: NodeDependencyType.Dev,
108+
name: 'tsickle',
109+
version: '^0.35.0',
110+
},
106111
{
107112
type: NodeDependencyType.Default,
108113
name: 'tslib',

0 commit comments

Comments
 (0)