Vue.js Assets issue. (vue-cli 4.1.1)


(I’m new to vue.js :stuck_out_tongue:)
I’ve been stuck for a while with the vue.js Assets folder.
I’m creating an application, with one codebase but different clients.
Each client runs an instance of my application on their own servers.

I’m using vue-cli 4.1.1

The only thing that is different are the assets, i want to bundle them all on build but here i fail every time no matter what i try…

I’ve created subfolders in assets :


in my component i get the images :

<img alt="Vue logo"  :src="require('@/'+xpath)">
this.xpath = 'assets/images/'+process.env.VUE_APP_CLIENT_ID+'/logo.jpg'


my .env file:

If i console.log the path it is displayed correctly. Yet during the build VUE ignores all my subfolders. and overwrites the ‘logo.jpg’ with the last ‘logo.jpg’ file it can find…

How can i force vuejs to get the assets from ‘assets/CLIENT_ID/’ and put those inside the /dist/assets folder without conflicts ?

Manual copying of the file after building is not an option since it will be prone to errors.

I hope someone can show me in the right direction on this.

Thank you in advance.

Best regards,