mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-29 09:02:03 +00:00
fix: polyfill $fetch on globalThis
TODO: nitro client plugin needs rewrite
This commit is contained in:
parent
bece3b85ab
commit
a1ac066cb5
@ -1,9 +1,12 @@
|
|||||||
import '@nuxt/nitro/dist/runtime/app/nitro.client'
|
import { $fetch } from 'ohmyfetch'
|
||||||
|
import _global from '@nuxt/un/runtime/global'
|
||||||
import logs from 'nuxt/app/plugins/logs.client.dev'
|
import logs from 'nuxt/app/plugins/logs.client.dev'
|
||||||
import progress from 'nuxt/app/plugins/progress.client'
|
import progress from 'nuxt/app/plugins/progress.client'
|
||||||
<% const plugins = app.plugins.filter(p => p.mode === 'client').map(p => p.src) %>
|
<% const plugins = app.plugins.filter(p => p.mode === 'client').map(p => p.src) %>
|
||||||
<%= nxt.importSources(plugins) %>
|
<%= nxt.importSources(plugins) %>
|
||||||
|
|
||||||
|
_global.$fetch = $fetch
|
||||||
|
|
||||||
const plugins = [
|
const plugins = [
|
||||||
progress,
|
progress,
|
||||||
<%= plugins.map(nxt.importName).join(',\n\t') %>
|
<%= plugins.map(nxt.importName).join(',\n\t') %>
|
||||||
|
Loading…
Reference in New Issue
Block a user