unplugin-fonts
unplugin-fonts copied to clipboard
Fonts for nested routes are not loaded properly
Hey, thank you for a great plugin! I'm having an issue when loading fonts from a nested route. Here's an example where you can reproduce the issue: https://stackblitz.com/edit/vitejs-vite-font-plugin-bug?file=src%2FApp.tsx
Steps to reproduce:
- Go to
/a/b/croute in the sandbox and refresh a page, check the network tab to see 404 error.
I think the issue is caused by injecting a relative path instead of an absolute one as a href attribute in the link tag. I'll post a PR that fixes the issue soon.