When executing @angular/build:ng-packagr via ng build it does respect tsconfig compilerOptions.customConditions which is nice, because we can resolve source files during local development in a monorepo. However, @angular/build:unit-test using @angular/build:ng-packagr as build target seems to drop/does not respect (?) compilerOptions.customConditions when running ng test. Site note: @angular/build:application has a conditions property in its schema and it works like a charm. Can you help me get it working for libs aswell?
{
"version": 1,
"cli": { "analytics": false },
"projects": {
"lib": {
"projectType": "library",
"root": "",
"sourceRoot": "src",
"architect": {
"build": {
"builder": "@angular/build:ng-packagr",
"options": {
"project": "ng-package.json",
"tsConfig": "tsconfig.build.json"
}
},
"test": {
"builder": "@angular/build:unit-test",
"options": {
"buildTarget": ":build",
"tsConfig": "tsconfig.spec.json",
"browsers": ["chromium"],
"watch": false,
"coverage": true,
}
}
}
}
}
}