S
SolidJS17h ago
seL3cT

solid router, absolute routes?

So i have compiled my solid app and have a few things i would like to change but dont know how, right now i host the app on my school server so for example server.com/name.surname/project_name/index.html so as u can see the app should run inside the project name folder but when i use the routing in the app, the search bar domain says for example server.com/contact and not server.com/name.surname/project_name/contact like it should which also makes the links not work when manually browsing to them, any fix? <Router root={Bars}> <Route path="/" component={Home} /> <Route path="/productie" component={Productie} /> <Route path="/over_ons" component={Over} /> <Route path="/historiek" component={Historiek} /> <Route path="/contact" component={Contact} /> <Route path="*" component={Verkeerde}/> </Router> that is my code for the routing
2 Replies
bigmistqke
bigmistqke17h ago
you are looking for the base option in vite config you can do base: './' i think
peerreynders
peerreynders16h ago
- Router has a base prop - Vite supports a base config option accessible with import.meta.env.BASE_URL - You'll probably want to vary that config based on dev vs. prod.
vitejs
Configuring Vite
Next Generation Frontend Tooling
vitejs
Building for Production
Next Generation Frontend Tooling

Did you find this page helpful?