-
-
Notifications
You must be signed in to change notification settings - Fork 190
Open
Description
Describe the bug
Step to Reproduce:
npm run dev: Things work well in dev mode, the text is getting bigger.npm run build && npm run preview: Breaks, the text size is static.
Explanation:
vite:cssplugin will transform style code via postcss (postcss-csso), then thev-bind(font + 'px')will be transformed tov-bind(font + "px")(single quote to double quote)@vue/compiler-sfcwill use different keys to generate css-var name:- use
hash(id + `font + 'px'`)->6507bc59in script block - use
hash(id + `font + "px"`)->65057679in style block
- use
Reproduction
https://stackblitz.com/edit/vitejs-vite-ovp8hf?file=vite.config.ts
System Info
Not RelatedUsed Package Manager
pnpm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- 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 https://github.com/vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels