Skip to content

Commit 17dbaeb

Browse files
committed
feat(@schematics/angular): emit declaration maps for local library builds
With this change we enable emitting declaration maps when building libraries to be consumed locally as this improved DX as this will allow editors to go to the original typescript file when using `Go to Definition`. For production builds, declaration maps are disabled because they are not useful since the source files are not included in the distributable package. Closes #17888
1 parent c1e1c8b commit 17dbaeb

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

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

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"outDir": "<%= relativePathToWorkspaceRoot %>/out-tsc/lib",
55
"target": "es2015",
66
"declaration": true,
7+
"declarationMap": true,
78
"inlineSources": true,
89
"types": [],
910
"lib": [

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

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
22
"extends": "./tsconfig.lib.json",
3+
"compilerOptions": {
4+
"declarationMap": false
5+
},
36
"angularCompilerOptions": {
47
"enableIvy": false
58
}

0 commit comments

Comments
 (0)