]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commit
feat(nuxt): deprecate old `$nuxt` context
authorEduardo San Martin Morote <posva13@gmail.com>
Wed, 13 Jul 2022 09:45:58 +0000 (11:45 +0200)
committerEduardo San Martin Morote <posva@users.noreply.github.com>
Wed, 13 Jul 2022 10:32:58 +0000 (12:32 +0200)
commit3e3041a84d2a1c7c4e6e62ac6c54ade949a1be94
tree304c0f22d322f949950b66123a62fb055e67f9b3
parent67e5417708d1ade18f42c16f6f0085e3787d06bf
feat(nuxt): deprecate old `$nuxt` context

BREAKING CHANGE: Starting on this version, `@pinia/nuxt` only works with
Nuxt 2 + Bridge and Nuxt 3, it no longer works with Nuxt 2 only. This is
necessary to have one single plugin that works well with the different
versions of Nuxt. If you aren't using bridge with Nuxt 2, check out the
[migration guide](https://v3.nuxtjs.org/bridge/overview) or pin your
`@pinia/nuxt` dependency in your:

```diff
-    "@pinia/nuxt": "^0.2.1",
+    "@pinia/nuxt": "0.2.1",
```

The `$nuxt` context usage should be replaced with globals like
`$fetch()` and `useNuxtApp()`. You can find more information about this
in Nuxt documentation:

- https://v3.nuxtjs.org/bridge/bridge-composition-api/
- https://v3.nuxtjs.org/bridge/overview
packages/nuxt/src/runtime/plugin.vue2.ts