We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://stackblitz.com/edit/nuxt-starter-j9nscj?file=vitest.config.ts
Hi there,
during Migration i came across an issue. I still have some Options API Components which are using this.$config.public to access Nuxt Runtime Config.
this.$config.public
It seems to be working fine but whenever i run vitest i receive the following error:
TypeError: Cannot read properties of undefined (reading 'public')
An simple Workaround for this is to simply mock $config globally. But shouldn't $config be working out of the box?
Thank you!
No response
TypeError: Cannot read properties of undefined (reading 'public') ❯ Proxy.data components/withPublicConfigAccess.vue:7:26 8| </template> 9| 10| <script> | ^ 11| export default { 12| data() { ❯ applyOptions node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:3460:30 ❯ finishComponentSetup node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:7663:7 ❯ setupStatefulComponent node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:7586:5 ❯ setupComponent node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:7515:36 ❯ mountComponent node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5845:7 ❯ processComponent node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5811:9 ❯ patch node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5290:11 ❯ ReactiveEffect.componentUpdateFn node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5955:11 ❯ ReactiveEffect.run node_modules/@vue/reactivity/dist/reactivity.cjs.js:181:19
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Environment
Reproduction
https://stackblitz.com/edit/nuxt-starter-j9nscj?file=vitest.config.ts
Describe the bug
Hi there,
during Migration i came across an issue. I still have some Options API Components which are using
this.$config.public
to access Nuxt Runtime Config.It seems to be working fine but whenever i run vitest i receive the following error:
TypeError: Cannot read properties of undefined (reading 'public')
An simple Workaround for this is to simply mock $config globally.
But shouldn't $config be working out of the box?
Thank you!
Additional context
No response
Logs
The text was updated successfully, but these errors were encountered: