mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
fix(nuxt3): default client-side fetch to use baseURL (#4456)
This commit is contained in:
parent
b82c6e3e96
commit
7b091abcea
@ -1,7 +1,7 @@
|
||||
// We set __webpack_public_path via this import with webpack builder
|
||||
import '#build/paths.mjs'
|
||||
import { createSSRApp, createApp, nextTick } from 'vue'
|
||||
import { $fetch } from 'ohmyfetch'
|
||||
import { baseURL } from '#build/paths.mjs'
|
||||
import { createNuxtApp, applyPlugins, normalizePlugins, CreateOptions } from '#app'
|
||||
import '#build/css'
|
||||
// @ts-ignore
|
||||
@ -12,7 +12,9 @@ import RootComponent from '#build/root-component.mjs'
|
||||
import AppComponent from '#build/app-component.mjs'
|
||||
|
||||
if (!globalThis.$fetch) {
|
||||
globalThis.$fetch = $fetch as any
|
||||
globalThis.$fetch = $fetch.create({
|
||||
baseURL: baseURL()
|
||||
})
|
||||
}
|
||||
|
||||
let entry: Function
|
||||
|
Loading…
Reference in New Issue
Block a user