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