-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
[v3.x] - public/fonts/font.woff
in index.html
contains __VITE_PUBLIC_ASSET__
#9174
Comments
public/folder/asset
in index.html
contains __VITE_PUBLIC_ASSET__
public/folder/font.woff
in index.html
contains __VITE_PUBLIC_ASSET__
public/folder/font.woff
in index.html
contains __VITE_PUBLIC_ASSET__
public/fonts/font.woff
in index.html
contains __VITE_PUBLIC_ASSET__
That looks like the issue is with |
public/fonts/font.woff
in index.html
contains __VITE_PUBLIC_ASSET__
public/fonts/font.woff
in index.html
contains __VITE_PUBLIC_ASSET__
We are having the same issue when migrating vite 2 to vite 3 bestofjs/bestofjs#148 (comment) It works fine in To reproduce: git clone https://github.com/bestofjs/bestofjs-webui
cd bestofjs-webui
git checkout 924d740ea6e7f80818d6e183dcef5a4b3e51a316
npm install
npm run build
npm run preview Open app in browser and navigate to Font requests File such as Online link: |
[Update]: Please update to - src: url('/fonts/OpenSans.woff') format('woff');
+ src: url('./public/fonts/OpenSans.woff') format('woff'); cc: @ihmpavel |
Please update to |
Describe the bug
Working fine prior 3.0.0. Tested up to
3.0.1
Having a font in in
/public/fonts/font.woff
referencing inindex.html
makes build not working.The path is not changed, but contains
__VITE_PUBLIC_ASSET__hash__
/public/fonts/font.woff
(needs to be infonts
folder)index.html
withvite build
index.html
now contains... src: url('__VITE_PUBLIC_ASSET__f5439943__') format('woff2'), url('__VITE_PUBLIC_ASSET__ee5c699b__') format('woff'), url('__VITE_PUBLIC_ASSET__fbd96617__') ...
. Public folder has correct filesReproduction
https://stackblitz.com/edit/vitejs-vite-5k3e58?file=dist%2Findex.html&terminal=dev
System Info
Used Package Manager
yarn
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: