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

Package detail

@pinia/nuxt

vuejs1.6mMIT0.11.0TypeScript support: included

Nuxt Module for pinia

pinia, nuxt, vue, vuex, store

readme

@pinia/nuxt

Nuxt 2 & 3 module

Installation

npm i pinia @pinia/nuxt

Usage

Add to modules (Nuxt 3) or buildModules (Nuxt 2) in nuxt.config.js:

// Nuxt 2
export default {
  buildModules: [['@pinia/nuxt', { disableVuex: true }]],
}
// Nuxt 3
export default defineNuxtConfig({
    modules: ['@pinia/nuxt'],
})

Note you also need @nuxtjs/composition-api if you are using Nuxt 2 without Bridge. Refer to docs for more.

License

MIT