How to configure Assets in Angular profile

51 Views Asked by At

In the styles.scss file, I import another scss file where I have custom colors: @import "./assets/dev/styles/colors"; in the rest of the project, I have components where I use icons and images: <img src="../../../../assets/dev/logo/logo-white.svg" alt="" class="logo">

I have three profiles, 'test1', 'test2' and 'dev'. My assets folder is structured like this:

assets
 ~ i18n
 ~ test1, test2, dev
   ~ favicon
   ~ icons
   ~ images
   ~ logo
   ~ styles

Is there a way to work with different assets depending on the profile?

Something like:

'test1':

@import "./assets/test1/styles/colors";
<img src="../../../../assets/test1/logo/logo-white.svg" alt="" class="logo">.

'test2':

@import "./assets/test2/styles/colors";
<img src="../../../../assets/test2/logo/logo-white.svg" alt="" class="logo">.

'dev':

@import "./assets/dev/styles/colors";
<img src="../../../../assets/dev/logo/logo-white.svg" alt="" class="logo">.
0

There are 0 best solutions below