import type { InlinePreset } from 'unimport' import { defineUnimportPreset } from 'unimport' const commonPresets: InlinePreset[] = [ // vue-demi (mocked) defineUnimportPreset({ from: 'vue-demi', imports: [ 'isVue2', 'isVue3' ] }) ] const appPreset = defineUnimportPreset({ from: '#app', imports: [ 'useAsyncData', 'useLazyAsyncData', 'useNuxtData', 'refreshNuxtData', 'clearNuxtData', 'defineNuxtComponent', 'useNuxtApp', 'defineNuxtPlugin', 'definePayloadPlugin', 'reloadNuxtApp', 'useRuntimeConfig', 'useState', 'clearNuxtState', 'useFetch', 'useLazyFetch', 'useCookie', 'useRequestHeaders', 'useRequestEvent', 'useRequestFetch', 'useRequestURL', 'setResponseStatus', 'setPageLayout', 'onNuxtReady', 'useRouter', 'useRoute', 'defineNuxtRouteMiddleware', 'navigateTo', 'abortNavigation', 'addRouteMiddleware', 'showError', 'clearError', 'isNuxtError', 'useError', 'createError', 'defineNuxtLink', 'useAppConfig', 'updateAppConfig', 'defineAppConfig', 'preloadComponents', 'preloadRouteComponents', 'prefetchComponents', 'loadPayload', 'preloadPayload', 'isPrerendered', 'getAppManifest', 'getRouteRules', 'definePayloadReducer', 'definePayloadReviver', 'requestIdleCallback', 'cancelIdleCallback' ] }) // vue-router const routerPreset = defineUnimportPreset({ from: '#app', imports: [ 'onBeforeRouteLeave', 'onBeforeRouteUpdate' ] }) // vue const vuePreset = defineUnimportPreset({ from: 'vue', imports: [ //