Is possible to use different assets array when i use ng build?
\"assets\": [
\"assets\",
\"favicon.ico\",
{
\"glob\": \"**/*\",
\"
My case was to include different robots.txt file per environment. So, in the src/environments folder I created two files: robots.txt and robots.prod.txt. In angular.json include it in assets array and use fileReplacements as follow (I paste only the relevant parts):
"architect": {
"build": {
"options": {
"assets": [
"src/assets",
{
"glob": "robots.txt",
"input": "src/environments/",
"output": "/"
}
]
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/robots.txt",
"with": "src/environments/robots.prod.txt"
}
]
}
}
}
}
I am using @angular/cli: ~8.3.4.