I`m using Angular 7 and i would like to know if exist any way to replace files no matter the enviroment using fileReplacement. Something like this: The problem tight now is that we are using the standard approach and we are forcing to replicate the replaced files in every environments.
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/app/modules/corporate/MainFooter/main-footer-container/socialmedia/styles/socialmedia.style.scss",
"with": "src/app/modules/corporate/MainFooter/main-footer-container/socialmedia/styles/socialmedia.inline.style.scss"
}
],
},
"stage": {
"fileReplacements": [
{
"replace": "src/app/modules/corporate/MainFooter/main-footer-container/socialmedia/styles/socialmedia.style.scss",
"with": "src/app/modules/corporate/MainFooter/main-footer-container/socialmedia/styles/socialmedia.inline.style.scss"
}
],
},
"dev": {
"fileReplacements": [
{
"replace": "src/app/modules/corporate/MainFooter/main-footer-container/socialmedia/styles/socialmedia.style.scss",
"with": "src/app/modules/corporate/MainFooter/main-footer-container/socialmedia/styles/socialmedia.inline.style.scss"
}
],
}
}
Is there any better way to do it?
Thank you!
Not support now, but multiple configurations will be supported in version 9.x .
By then you can use like this config
https://github.com/angular/angular-cli/issues/10612
https://github.com/angular/angular-cli/pull/15819