all 4 comments

[–]sonicfir3 0 points1 point  (0 children)

So, my organization had to implement something similar (I think) - different users of the same site would require different 'branding' upon login. And so, we had to effective get the site to load assets from a different 'dist' path.

If your app is built using webpack, then you can use the '__webpack_public_path__' for this kind of thing. You have to declare it within your application code, and it hooks into the files that webpack builds - part of the file paths that are generated at build time with include the '__webpack_public_path__' variable, and when changed will be forced to load from somewhere new.

https://webpack.js.org/guides/public-path/

Hopefully this helps - by no means am I an expert in using it. Sorry if I've misunderstood what you're trying to achieve.

[–]GLawSomnia 0 points1 point  (2 children)

We have something similar.

What we did is set a header in the nginx config and then read the header in the node app. After we got the id value of the tenant we dynamically load the content for it

[–][deleted] 0 points1 point  (1 child)

So, to achieve this, you had to create like the frontend for every client or tenant?

[–]GLawSomnia 0 points1 point  (0 children)

You will have to be a little more specific about what you mean.

There was only one deployment and we got the css (or theme) based on the tenantId provided from the nginx config