Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/danielroe/roe.dev. This is the code and content for my personal website, built in Nuxt. roe.dev
Something went wrong. Try again.
312 B · 9 lines
TypeScript
12345678910import { createFetch } from 'ofetch'import { fetch } from 'nitro'// @ts-expect-error resolved by nitro at build timeimport { baseURL } from '#internal/nuxt/paths'
export const $fetch = globalThis.$fetch ??= createFetch({ fetch, defaults: { baseURL: baseURL() },}) as unknown as typeof globalThis.$fetch