-
-
Notifications
You must be signed in to change notification settings - Fork 6.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using a full url as the base path generates bad parameters for @font-face url #11857
Comments
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 During transformation when vite attempts to resolve the public asset paths from |
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:/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: