Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@vueuse/nuxt

vueuse942.5kMIT13.2.0TypeScript support: included

VueUse Nuxt Module

vue, vueuse, nuxt, nuxt3, nuxt-module

readme

@vueuse/nuxt

NPM version

This is an add-on of VueUse, which provides better Nuxt integration auto-import capabilities.

Install

Install the vueuse module into your application using nuxi:

npx nuxi@latest module add vueuse

Or use npm:

npm i @vueuse/nuxt @vueuse/core
// nuxt.config
export default defineNuxtConfig({
  modules: [
    '@vueuse/nuxt',
  ],
})

Caveats

The following utils are disabled from auto-import for Nuxt to avoid conflicts with Nuxt's built-in utils:

  • toRef
  • toRefs
  • toValue
  • useFetch
  • useCookie
  • useHead
  • useTitle
  • useStorage
  • useImage

You can always use them by explicitly importing from @vueuse/core

License

MIT License © 2021-PRESENT Anthony Fu