Multiple components using shared CSS via style
tag and src
is causing undefined reading 'scoped'
error
#8660
Unanswered
eneeio-nm
asked this question in
Help/Questions
Replies: 2 comments 1 reply
-
P.s. I came across this PR which seems to fix the problem but there doesn't seem to be any documentation around it. |
Beta Was this translation helpful? Give feedback.
0 replies
-
This seems to work: <style lang="css">
@import url('shared.css');
</style> It would be good to know if this is the preferred method for sharing CSS across multiple single file components in Vue using Vite. |
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
-
Hi all,
I have two separate SFC using shared CSS using
<style lang="css" src="shared.css"></style>
When I try to build the project
vite:vue
is throwing an error stating[vite:vue] Cannot read properties of undefined (reading 'scoped')
Does anyone know how to resolve this issue, please?
Beta Was this translation helpful? Give feedback.
All reactions