chore: add `ofetch` to `typescript.hoist`

pull/2693/head
userquin 2024-03-17 17:05:13 +01:00
rodzic 48c013709a
commit a3a7511606
2 zmienionych plików z 2 dodań i 6 usunięć

Wyświetl plik

@ -55,15 +55,10 @@ export default defineNuxtPlugin(async () => {
const localCall = createCall(toNodeListener(h3App) as any)
const localFetch = createLocalFetch(localCall, globalThis.fetch)
// eslint-disable-next-line ts/prefer-ts-expect-error
// @ts-ignore error TS2321: Excessive stack depth comparing types
globalThis.$fetch = createFetch({
// eslint-disable-next-line ts/prefer-ts-expect-error
// @ts-ignore slight differences in api
// @ts-expect-error slight differences in api
fetch: localFetch,
Headers,
// eslint-disable-next-line ts/prefer-ts-expect-error
// @ts-ignore error TS2321: Excessive stack depth comparing types
defaults: { baseURL: config.app.baseURL },
})

Wyświetl plik

@ -9,6 +9,7 @@ const { resolve } = createResolver(import.meta.url)
export default defineNuxtConfig({
typescript: {
hoist: ['ofetch'],
tsConfig: {
exclude: ['../service-worker'],
vueCompilerOptions: {