unplugin-fonts icon indicating copy to clipboard operation
unplugin-fonts copied to clipboard

Fonts for nested routes are not loaded properly

Open taranek opened this issue 3 years ago • 0 comments

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:

  1. Go to /a/b/c route 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.

taranek avatar Oct 17 '22 20:10 taranek