I have started using vite and everything works fine on dev but when doing build
nothing displayed because it build to the root /
which is a problem because I want to deploy it to a server as in https://example.com/iframes/app
so I can then use an iframe to access this url.
So I have changed the vite.confi.js
to
base: '', // This will ensure that paths are relative to the current directory
build: {
outDir: 'dist',
assetsDir: 'assets',
},
This works for everything execept for all the assets that were on public
on dev it’s all fine but on build the browser looks for it at the root level of the server
`https://example.com/asset-on-public.svg`
instead of the desired
`https://example.com/iframes/app/asset-on-public.svg`
Any ideas?