Routes not loading if navigated directly to it
Hi! I'm trying to figure out why after building I can't open links directly to nested routes, as it cant find any of the assets (JS and CSS bundles)
I believe this is a vite thing but i followed the docs and doesn't mention anything about the base route, any ideas on how to fix this?
For example:
https://supersecretDomain.com/cabina
works as it should, but https://supersecretDomain.com/cabina/1
where routes is defined as /_layout/cabina/$serviceOrderId
doesn't load4 Replies
ratty-blushOP•13mo ago
Here is an example:
When it should be looking for the file at the route of
https://supersecretDomain.com
where it really is, navigate through the application works correctlyambitious-aqua•13mo ago
Make sure your
index.html
is referencing your bundles using absolute pathing and not using relative links.
Other than that, vite should be handling the rest of it just fine.harsh-harlequin•8mo ago
I'm getting similar errors
I'm used to the absolute path and then switched to TS Path Aliases.
It failed to load the CSS file in both cases https://dev--consultin.netlify.app/
Can anyone advise?
foreign-sapphire•6mo ago
Did you ever figure out the error ?