-
Notifications
You must be signed in to change notification settings - Fork 670
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
Vite resolve.alias
causes some tests to fail
#2063
Comments
The above-mentioned "workaround 1" causes a few other problems, where some
|
rudolfbyker
changed the title
Vite
Vite Apr 11, 2023
resolve.alias
is not respectedresolve.alias
causes some tests to fail
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Subject of the issue
It looks like vitest is not respecting the
resolve.alias
setting from thevite
config file.Steps to reproduce
See https:/rudolfbyker/vitest-vue2-vuetify-repro
Expected behaviour
The test should pass.
Actual behaviour
"Cannot read properties of undefined" whenever we try to access something like "$vuetify" on a Vue instance.
Possible Solution
No solutions, but some workarounds:
Workaround 1: Monkey-one of my colleagues found a workaround. However, it's a bit arduous when there are many tests:patch the require function in tests (yuck)
vue: "vue/dist/vue.common.js"
instead ofvue: "vue/dist/vue.esm.js"
.Workaround 2:
Don't use aliases. But then I can't have the runtime compiler for my project, which is a big problem.
Workaround 3:
The text was updated successfully, but these errors were encountered: