This is an add-on of VueUse, which provides better Nuxt integration auto-import capabilities.
npm i @vueuse/nuxt @vueuse/core
// nuxt.config
export default defineNuxtConfig({
modules: [
'@vueuse/nuxt',
],
})
The following utils are disabled from auto-import for Nuxt to avoid conflicts with Nuxt's built-in utils:
toRefs
useFetch
useCookie
useHead
useTitle
useStorage
You can always use them by explicitly import from @vueuse/core
MIT License © 2021-PRESENT Anthony Fu