CSS modules aren't recognized in tests #804
Unanswered
MevenGedivote
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I have a problem when mounting a basic component. I keep getting an error that it can't read the property of the $style object used by CSS Modules :
TypeError: Cannot read properties of undefined (reading 'wrapper')
❯ Proxy._sfc_render components/Home.vue:2:40
1| <template>
2| <div id="home" :class="$style.wrapper">
My vitest.config configuration file is very basic, it only defines aliases and a few environment options.
When I only pass a string for the class property and not the $style.[classname] variable, my tests run fine.
I don't understand what I am missing, every auto-imports of components, composables etc. is working fine, except this part. 🤷
Thanks in advance, have a good day !
Beta Was this translation helpful? Give feedback.
All reactions