You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
I've done some debugging and found where this is caused: during the asset resolution, public assets are always treated like a file path and not possibly as a URL, so URL's get normalised and have the double / removed by normalizePath.
Describe the bug
If you use a full URL as the base path in your vite config:
And reference a font URL like below in your html:
After performing a build, the parameter that is generated during a build for the
url()
call is invalid:It has the incorrect amount of
/
s afterhttp:
Reproduction
https://github.com/Codex-/vite-font-url-bug
Steps to reproduce
npm i
npm run build
System Info
Used Package Manager
npm
Logs
Click to expand!
Validations
The text was updated successfully, but these errors were encountered: