I am faced with the challenge of using a single code-base for my Vue application, but needing to compile it with different styles depending on the end user. Each end user (which in this case refers to a group or organization) has their own specific CSS file stored in subfolders within the public
(or assets
) directory. For example:
\public\user1\all.css
\public\user2\all.css
\public\user3\all.css
When building my application with npm run build
, I want to be able to specify which CSS file to use, like so:
$ npm run build -css_path \public\user1\all.css
However, I'm unsure if this approach is technically feasible and if there is a better way to achieve this customization. What is the best practice for dynamically applying different styles to a Vue application during the build or compilation stage?