I have an Angular app that we sell to different companies. The app is the same for all of them, except for a few differences among them.
Each one has a different Angular theme (a .scss file) and a specific configuration (which I managed to include in a different environment for each one).
So far, I created a configuration in the angular.json file replacing the default environment with the company's environment and the default theme with the company's theme as follows:
"COMPANY": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/COMPANY.ts"
},
{
"replace": "src/app/theme/theme.scss",
"with": "src/app/theme/_COMPANY.scss"
}
]
},
What I do to deploy into production is execute this command:
ng build -c COMPANY --prod --base-href "http://destination_url_of_the_app"
Then I copy the files in /dist into the server.
For the moment only the environment works, the theme is never replaced.
What is the best practice to achieve this? What am I doing wrong?
Thank you.