Specify a base path for your app
v3If your application is deployed to a subfolder, wrap your application with the <Router /> component and provide the base prop. This scopes all <Link /> href attributes and useLocation() return values to the base path. Nested routers will inherit and stack base paths.
import { Router, Route, Link } from "wouter";
const App = () => (
<Router base="/app">
{/* the link's href attribute will be "/app/users" */}
<Link href="/users">Users</Link>
<Route path="/users">The current path is /app/users!</Route>
</Router>
);