Closed MiftikCZ closed 1 year ago
The preact-router
package is a client side routing library. It looks and works with the history
API matches what route the user is on. Because of that it has no knowledge of how you're authoring the application. It sounds like you're expecting assets to be loaded and discarded for the current route. That's functionality that is typically provided by the meta-framework or preset you're using to build your application. These know how you authored your code and can rewrite it accordingly. Posting the question there might yield more answers.
first route
first.css
corectlly just for the first routeexport default function({}) { return <> ... some code here </> }
app.tsx
import './index.css' import "@fontsource/fira-sans"
render((
), document.getElementById('app') as HTMLElement)