]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
chore: add notes [skip ci]
authorEduardo San Martin Morote <posva13@gmail.com>
Thu, 14 Oct 2021 10:16:06 +0000 (12:16 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Thu, 14 Oct 2021 10:16:06 +0000 (12:16 +0200)
packages/nuxt/src/index.ts
packages/nuxt/templates/plugin.js

index 10f5836baa76d78bea160df2bc276bff0d2c5be6..eecf80545dee63ebdd9030951b47cdd4746f1cb2 100644 (file)
@@ -34,10 +34,6 @@ const module = defineNuxtModule<PiniaNuxtOptions>({
 
     addPlugin({ src: resolve(__dirname, '../templates/plugin.js') })
 
-    // Define pinia resolution to ensure plugins register global context successfully
-    // TODO: needed with @nuxt/bridge but not without it...
-    // nuxt.options.alias['pinia'] = nuxt.options.alias['pinia'] || resolveModule('pinia/index.mjs')
-
     // transpile pinia if @vue/composition-api is transpiled because we must use the same instance
     if (
       !nuxt.options.dev &&
index 156bfadd2abfb78f95dc5bb014b8d87f89f7bbfa..427eb387b943ff14d09b49be5b465fbbef18eff3 100644 (file)
@@ -29,6 +29,7 @@ const PiniaNuxtPlugin = (context, inject) => {
   setActivePinia(pinia)
 
   // add access to `$nuxt`
+  // TODO: adapt to Nuxt 3 with a definePlugin
   pinia._p.push(({ store }) => {
     // make it non enumerable so it avoids any serialization and devtools
     Object.defineProperty(store, '$nuxt', { value: context })