]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
fix: workaround prod build bug
authorEduardo San Martin Morote <posva13@gmail.com>
Wed, 10 Nov 2021 17:28:16 +0000 (18:28 +0100)
committerEduardo San Martin Morote <posva13@gmail.com>
Wed, 10 Nov 2021 17:28:16 +0000 (18:28 +0100)
packages/nuxt/src/templates/plugin.ts

index f42300edc6ef83bb5623c8c6f1e1653ae0598fe2..df6717d043c817d972d12fd098490c066da05961 100644 (file)
@@ -5,7 +5,9 @@ import type { Plugin } from '@nuxt/types'
 const PiniaNuxtPlugin: Plugin = (context, inject) => {
   if (isVue2) {
     install()
-    Vue2.use(PiniaVuePlugin)
+    // TODO: workaround that should probably be removed in the future
+    const Vue = 'default' in Vue2 ? Vue2.default : Vue2
+    Vue.use(PiniaVuePlugin)
   }
 
   const pinia = createPinia()