-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
Setting style.scoped to true / false in Vue options has no effect #7832
Comments
From the design perspective, I wouldn't want Vue users to be able to set the What's the use case here? |
I get that, but when I found the option, I was thinking, that's what it does... So the other option would be, to get rid of the option, I think. My use case is quite special: We're building a Vue App with Vite using scoped Styles in components. Everythings fine here. I don't know if I'd count this as a valid use-case, if I maintained Vite. 😉 |
I found another work-around for our weird problem. I get why this feature would be weird. So I think it's completely fine if you decide you don't want that. In that case, I'd still remove the option from the types then. |
Describe the bug
When I set
style.scoped: true
in Vue plugin options, I would have expected, that all SFCs would now use scoped styles. But it does not seem to have any effect.The same goes for setting
style.scoped: false
. I would have expected, it overrides SFCs, that explicitly setstyle scoped
, not to use scoped styles.I think the bug (if it is one and not intended) is, that
block.scoped
always overridesstyle.scoped
here: https://github.com/vitejs/vite/blob/main/packages/plugin-vue/src/style.ts#L25Reproduction
https://stackblitz.com/edit/vitejs-vite-oiw3bg?file=vite.config.js
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: