packages/angular/src/migrations/update-21-5-0/set-tsconfig-option.md
tsConfig option for build and test targetstsConfig option in the target options for library build executors. It moves the value from the target development configuration and it doesn't set it if the option is already set.tsconfig.spec.json as the tsConfig option in the target options for the @nx/jest:jest executor. It only does it if the file exists and the options is not already set.The migration will move the tsConfig option for library build executors (@nx/angular:ng-packagr-lite and @nx/angular:package) from the development configuration to the target options if it's not already set:
{
"targets": {
"build": {
"executor": "@nx/angular:ng-packagr-lite",
"configurations": {
"development": {
"tsConfig": "libs/lib1/tsconfig.lib.dev.json"
}
}
}
}
}
{
"targets": {
"build": {
"executor": "@nx/angular:ng-packagr-lite",
"options": {
"tsConfig": "libs/lib1/tsconfig.lib.dev.json"
},
"configurations": {
"development": {}
}
}
}
}
The migration will set the tsConfig option for the @nx/jest:jest executor when the tsconfig.spec.json file exists and the option is not already set:
{
"targets": {
"test": {
"executor": "@nx/jest:jest"
}
}
}
{
"targets": {
"test": {
"executor": "@nx/jest:jest",
"options": {
"tsConfig": "apps/app1/tsconfig.spec.json"
}
}
}
}
If the tsConfig option is already set in the target options, the migration will not modify the configuration:
{
"targets": {
"build": {
"executor": "@nx/angular:ng-packagr-lite",
"options": {
"tsConfig": "libs/lib1/tsconfig.lib.json"
},
"configurations": {
"development": {
"tsConfig": "libs/lib1/tsconfig.lib.dev.json"
}
}
}
}
}
{
"targets": {
"build": {
"executor": "@nx/angular:ng-packagr-lite",
"options": {
"tsConfig": "libs/lib1/tsconfig.lib.json"
},
"configurations": {
"development": {
"tsConfig": "libs/lib1/tsconfig.lib.dev.json"
}
}
}
}
}