mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-28 05:03:58 +00:00
21 lines
469 B
JavaScript
21 lines
469 B
JavaScript
import { $fetch } from 'ohmyfetch'
|
|
import logs from 'nuxt/app/plugins/logs.client.dev'
|
|
import progress from 'nuxt/app/plugins/progress.client'
|
|
<% const plugins = app.plugins.filter(p => p.mode === 'client').map(p => p.src) %>
|
|
<%= nxt.importSources(plugins) %>
|
|
|
|
if (!globalThis.$fetch) {
|
|
globalThis.$fetch = $fetch
|
|
}
|
|
|
|
const plugins = [
|
|
progress,
|
|
<%= plugins.map(nxt.importName).join(',\n\t') %>
|
|
]
|
|
|
|
if (process.dev) {
|
|
plugins.push(logs)
|
|
}
|
|
|
|
export default plugins
|