I'm currently working on an Angular 4 project using Webpack.
I'd like to be able to customize my app main colors.
All my components SCSS files import a file named color.scss containing colors variables.
@import "src/assets/sass/color";
I have two files:
- src/assets/sass/_color.scss: default SCSS file.
- src/custom/A/assets/sass/_color.scss: customized SCSS file for A.
I'd like to tell webpack to replace this url when resolving, depending on a parameter I pass.
Therefore, when I execute:
webpack-dev-server --env.custom=A
Webpack would change all the imports of color.scss to "src/custom/A/assets/sass/color".
Is it possible ? If it is, how can it be implemented ?
@import "src/custom/A/assets/sass/color";insidesrc/assets/sass/_color.scssthen rebuild? - hayden