#L10 Vite relative path?
4 messages · Page 1 of 1 (latest)
For what exactly? If you're doing imports, like pictures, Vite would process that correctly
The JS isn't loading because of CORS. I have a setup where users can have custom domains, etc.
If I would use relative paths for the resources then the CORS issue would disappear.
So, instead of having myapp.com/foo/bar/app-123.js I should have just /foo/bar/app-123.js in my script tag. That's what I'm going for
https://laravel.com/docs/11.x/vite#custom-base-urls
Though, loading assets isn't subject to CORS, only requests initiated from scripts