Replies: 1 comment
-
If currently there is no way to achieve that, should I open a feature request issue? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello.
I'm using ShadowRoot, and I have the need to adopt some (not all) global styles to shadow DOMs.
example: https://stackblitz.com/edit/vitejs-vite-orv9nq?file=index.html (using SCSS)
npm run dev
works as expected because CSS files are not merged during dev.npm run build && npm run preview
doesn't work, because CSS files have been merged into a single file, and the elementlink#bgRed
has gone.Vite option
build.cssCodeSplit
has nothing to do with this situation. I set it totrue
in the example.There are indeed workarounds (and I'm using the first one for now), but they all have drawbacks:
import
statement to import them in code again: style content will be downloaded twice.Beta Was this translation helpful? Give feedback.
All reactions