Font rendering difference between dev vite server and built #12415
Unanswered
alexchexes
asked this question in
Help/Questions
Replies: 1 comment 1 reply
-
Cannot reproduce on a Mac. But I think maybe you should try diff all computed styles to see what's changed. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Vue version
3.5.12
Link to minimal reproduction
https://github.com/alexchexes/vue-built-font-rendering-difference
Steps to reproduce
pnpm install
,pnpm dev
pnpm run build
,pnpm run preview
What is expected?
The font should render identically in both environments — live preview via the Vite dev server and the built HTML
What is actually happening?
The font renders thinner in the Vite dev server compared to the built HTML (or the other way around - font rendered thicker in the built HTML compared to the Vite dev server)
System Info
Any additional comments?
The issue arises in the default Vue HelloWorld template with all styles and settings being default. Only a single line of HTML and one CSS rule were added to demonstrate the issue.
I first encountered this while setting up Tailwind CSS in a freshly created Vue HelloWorld app. Later, I reproduced the issue without Tailwind or any other modifications — only the default Vue HelloWorld setup was used.
Here is a screencast demonstration:
chrome_2024-11-16--13-30-01--632.mp4
Vite dev server:
Build:
Computed styles are identical in both cases:
Beta Was this translation helpful? Give feedback.
All reactions