Skip to content

Commit 0c2c2a1

Browse files
committed
build: adjust build config to work properly with ng-packagr
1 parent b22c5fd commit 0c2c2a1

File tree

3 files changed

+34
-13
lines changed

3 files changed

+34
-13
lines changed

karma.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ module.exports = function (config) {
4444
transforms: [require('karma-typescript-es6-transform')()],
4545
validateSyntax: true,
4646
},
47-
tsconfig: './tsconfig.json',
47+
tsconfig: './tsconfig.spec.json',
4848
reports:
4949
{
5050
lcovonly: {

tsconfig.json

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,48 @@
11
{
2+
"buildOnSave": false,
3+
"compileOnSave": false,
24
"compilerOptions": {
35
"baseUrl": ".",
4-
"emitDecoratorMetadata": true,
6+
"target": "es2015",
7+
"module": "es2015",
8+
"moduleResolution": "node",
9+
"outDir": "dist",
10+
"declaration": true,
11+
"declarationDir": "dist",
12+
"inlineSourceMap": true,
13+
"inlineSources": true,
14+
"skipLibCheck": true,
15+
"emitDecoratorMetadata": false,
516
"experimentalDecorators": true,
17+
"importHelpers": true,
18+
"lib": [
19+
"dom",
20+
"es2018"
21+
],
622
"strict": true,
723
"strictPropertyInitialization": false,
824
"noUnusedParameters": true,
925
"noUnusedLocals": true,
10-
"module": "commonjs",
11-
"moduleResolution": "node",
12-
"rootDir": ".",
1326
"paths": {
1427
"ngrx-forms": [
1528
"."
1629
]
1730
},
18-
"sourceMap": true,
19-
"inlineSources": true,
20-
"target": "es5",
21-
"skipLibCheck": true,
22-
"lib": [
23-
"es2015",
24-
"dom"
25-
],
2631
"typeRoots": [
2732
"./node_modules/@types/"
2833
]
2934
},
35+
"angularCompilerOptions": {
36+
"enableIvy": false,
37+
"skipTemplateCodegen": true,
38+
"strictMetadataEmit": true,
39+
"fullTemplateTypeCheck": true,
40+
"enableResourceInlining": true
41+
},
3042
"exclude": [
3143
"node_modules",
3244
"example-app",
45+
"dist",
3346
"types"
3447
]
3548
}

tsconfig.spec.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"target": "es5",
5+
"module": "commonjs",
6+
"emitDecoratorMetadata": true
7+
}
8+
}

0 commit comments

Comments
 (0)