From: Eduardo San Martin Morote Date: Wed, 31 Mar 2021 09:40:34 +0000 (+0200) Subject: docs: disableVuex X-Git-Tag: v2.0.0-alpha.9~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8fc419ab305b136327e70bf5c12139d80ed9ab4f;p=thirdparty%2Fvuejs%2Fpinia.git docs: disableVuex --- diff --git a/docs/ssr/nuxt.md b/docs/ssr/nuxt.md index 77497d8b..561a894e 100644 --- a/docs/ssr/nuxt.md +++ b/docs/ssr/nuxt.md @@ -61,6 +61,21 @@ defineStore({ }) ``` +## Using Pinia alongside Vuex + +It is recommended to **avoid using both Pinia and Vuex** but if you need to use both, you need to tell pinia to not disable it: + +```js +// nuxt.config.js +export default { + buildModules: [ + '@nuxtjs/composition-api', + ['pinia/nuxt', { disableVuex: false }], + ], + // ... other options +} +``` + ## Typescript If you are using TypeScript or have a `jsconfig.json`, you should also add the types for `context.pinia`: