I am currently developing an app that has dynamic theming requirements, which can only be determined during run time. However, during build time, there are theme variables accessible for all themes.
Is there a way to configure webpack to compile node modules - such as bootstrap - with different variables files? Ideally, I would like webpack to generate multiple versions/themes of bootstrap at build time. Then, during run time, I could simply reference the appropriate css file based on a specific prefix.
For example:
theme1.bootstrap.css
theme2.bootstrap.css
theme3.bootstrap.css
The framework I am using is Bootstrap 4 in conjunction with webpack 2.
My question is: Can this be achieved with webpack, and if so, how?