mirror of https://github.com/nocodb/nocodb
mertmit
1 year ago
committed by
GitHub
3 changed files with 15 additions and 15 deletions
@ -1,12 +1,12 @@
|
||||
import { defineNuxtPlugin, isEeUI, useApi } from '#imports' |
||||
|
||||
const apiPlugin = defineNuxtPlugin((nuxtApp) => { |
||||
const apiPlugin = (nuxtApp) => { |
||||
/** injects a global api instance */ |
||||
nuxtApp.provide('api', useApi().api) |
||||
}) |
||||
|
||||
const defaultExport = isEeUI ? defineNuxtPlugin(async () => {}) : apiPlugin |
||||
} |
||||
|
||||
export { apiPlugin } |
||||
|
||||
export default defaultExport |
||||
export default defineNuxtPlugin(function (nuxtApp) { |
||||
if (!isEeUI) return apiPlugin(nuxtApp) |
||||
}) |
||||
|
Loading…
Reference in new issue