From: Eduardo San Martin Morote Date: Wed, 3 Mar 2021 15:14:43 +0000 (+0100) Subject: refactor: remove unused code X-Git-Tag: v0.2.0~31 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=80abf5ee9296d1e5d6b97a6b599d388565469d8c;p=thirdparty%2Fvuejs%2Fpinia.git refactor: remove unused code --- diff --git a/nuxt/plugin.js b/nuxt/plugin.js index c00ea7a9..abbe3581 100644 --- a/nuxt/plugin.js +++ b/nuxt/plugin.js @@ -1,16 +1,13 @@ // @ts-check import Vue from 'vue' // @ts-ignore: this must be pinia to load the local module -import { setActiveReq, PiniaSsr, setStateProvider, getRootState } from 'pinia' - -if (process.server) { - Vue.use(PiniaSsr) -} +import { setActiveReq, setStateProvider, getRootState } from 'pinia' /** @type {import('@nuxt/types').Plugin} */ const myPlugin = (context) => { // console.log('🍍 Pinia Nuxt plugin installed') + // TODO: figure this out if (process.server) { setActiveReq(context.req) context.beforeNuxtRender(({ nuxtState }) => { diff --git a/src/rootStore.ts b/src/rootStore.ts index 2cc4a6c7..4326ce3e 100644 --- a/src/rootStore.ts +++ b/src/rootStore.ts @@ -117,7 +117,6 @@ export interface Pinia { Vue: VueConstructor } -export const IS_CLIENT = typeof window !== 'undefined' /** * Creates a Pinia instance to be used by the application