mirror of
https://github.com/nocodb/nocodb.git
synced 2026-05-01 14:06:55 +00:00
* fix: use worker url instead of inline * fix: quick import local * fix: warning * fix: use module only in dev mode
19 lines
352 B
TypeScript
19 lines
352 B
TypeScript
const apiPlugin = (nuxtApp) => {
|
|
const { api } = useApi()
|
|
|
|
/** injects a global api instance */
|
|
nuxtApp.provide('api', api)
|
|
}
|
|
|
|
declare module '#app' {
|
|
interface NuxtApp {
|
|
$api: ReturnType<typeof createApiInstance>
|
|
}
|
|
}
|
|
|
|
export { apiPlugin }
|
|
|
|
export default defineNuxtPlugin(function (nuxtApp) {
|
|
if (!isEeUI) return apiPlugin(nuxtApp)
|
|
})
|