Where to specify delete-output-path?
For Angular CLI 6+ you have to edit angular.json file. You have to set deleteOutputPath
false
in build options
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "../dist",
"deleteOutputPath": false, <--------------------------- put here
"index": "src/index.html",
Yes, you can. You have to put it under defaults property of .angular-cli.json like this:
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"project": {
"name": "project-name"
},
"apps": [
{// app property values here}
],
"e2e": {
"protractor": {
"config": "./protractor.conf.js"
}
},
"test": {
"karma": {
"config": "./karma.conf.js"
}
},
"defaults": {
"styleExt": "scss",
"component": {},
"serve": {
"port": 3000
},
"build": {
"deleteOutputPath": false
}
}
}
If you want to learn more about this file's structure, you can go here
Hope it helps :)