From: Eduardo San Martin Morote Date: Wed, 10 Nov 2021 17:28:16 +0000 (+0100) Subject: fix: workaround prod build bug X-Git-Tag: @pinia/nuxt@0.1.4~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e1ebadb4892608b02d370f18296a6bae256acd05;p=thirdparty%2Fvuejs%2Fpinia.git fix: workaround prod build bug --- diff --git a/packages/nuxt/src/templates/plugin.ts b/packages/nuxt/src/templates/plugin.ts index f42300ed..df6717d0 100644 --- a/packages/nuxt/src/templates/plugin.ts +++ b/packages/nuxt/src/templates/plugin.ts @@ -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()