NuxtN
Nuxt4y ago
Zampa

What is the recommended way to explicitly import $fetch or useCookie into a Pinia store?

import { $fetch } from 'ofetch';
import { useCookie } from '#imports';

?

I'm trying to ensure that whenever @nuxt/test-utils-edge pulls in the store for a test that it can find those normally auto-imported helpers/composables.
Was this page helpful?