I don't believe there is an option to do environment specific assets. But you can make additional apps in your angular-cli.json which are basically just copies of each other, but with different assets. For example
// angular-cli.json
"apps": [
{
"root": "src",
"outDir": "dist",
"name": "devApp",
"assets" : [
"assets",
"favicon.ico",
{
"glob": "**/*",
"input": "../externalDir",
"output": "./app/",
"allowOutsideOutDir": true
},
],
...
},
{
"root": "src",
"outDir": "dist",
"name": "prodApp",
"assets": [
"assets",
"favicon.ico"
],
...
}
]
Now you can build your assets differently by building a specific "app"
// dev
ng build --app=0
// or
ng build --app=devApp
// prod
ng build --app=1
// or
ng build --app=prodApp
Angular cli docs on multiple apps.