2021-02-19 13:59:47 +00:00
|
|
|
import { $fetch } from 'ohmyfetch'
|
2021-01-18 12:46:19 +00:00
|
|
|
import logs from 'nuxt/app/plugins/logs.client.dev'
|
|
|
|
import progress from 'nuxt/app/plugins/progress.client'
|
2021-02-19 01:08:45 +00:00
|
|
|
<% const plugins = app.plugins.filter(p => p.mode === 'client').map(p => p.src) %>
|
|
|
|
<%= nxt.importSources(plugins) %>
|
2021-01-18 12:46:19 +00:00
|
|
|
|
2021-04-06 12:10:57 +00:00
|
|
|
if (!globalThis.$fetch) {
|
|
|
|
globalThis.$fetch = $fetch
|
|
|
|
}
|
2021-02-19 13:59:47 +00:00
|
|
|
|
2021-01-18 12:46:19 +00:00
|
|
|
const plugins = [
|
2021-02-19 01:08:45 +00:00
|
|
|
progress,
|
|
|
|
<%= plugins.map(nxt.importName).join(',\n\t') %>
|
2021-01-18 12:46:19 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
if (process.dev) {
|
|
|
|
plugins.push(logs)
|
|
|
|
}
|
|
|
|
|
|
|
|
export default plugins
|