Closed piavgh closed 3 years ago
hello @piavgh I can't seem to reproduce this, can you please provide what SPA you tested with?
Hi @rezk2ll ,
As Michael confirmed that our SPAs will be deployed on the same domain with the backend API. I think it will not be a problem for us anymore.
The reason behind it is: in some .pug files or .css files, we link to this /images/white-logo.svg using src="/images/white-logo.svg"
or url(...)
, so if the SPA and backend API are on different domains, this request will be 404 not found.
But now they are on the same domain (e.x localhost:8080 or abc.com), when it requests to 'images/white-logo.svg', the backend API can still return the data.
I will close this issue
we need this to split the domain, backend and frontend wont be on the same domain
we need first to migrate static ressources on each SPA
We now want to deployed SPAs on different domains that the the backend API
https://github.com/OpenPaaS-Suite/esn-frontend-common-libs/issues/104#issuecomment-681985163
All assets must be use the SPA name output.
Need to done on each SPA :
After investigation, we need also to add the tiny logo
and the throbber-amber.svg
like it was done for the white-logo
here : https://github.com/rezk2ll/esn-frontend-contacts/blob/92ac91cf7615ad692a13b581ad802b70f56a6562/webpack.commons.js#L82 and here for the throbber-amber.svg
here : https://github.com/linagora/esn-frontend-calendar-public/pull/32/files?file-filters%5B%5D=.js
You can try to replicate this issue by running
npm run build:prod
and serve thedist
folder using a custom webserver (maybe Nginx or https://chrome.google.com/webstore/detail/web-server-for-chrome/ofhbbkphhbklhfoeikjpcbhemlocgigb)Don't use
npm run serve:prod
because it will usewebpack-dev-server
. The webpack server has a proxy to our backend so that it can get the .svg)It causes the UI to be broken. This image needs to be fetched from backend because if a user changes theme, it will also be updated