From 7e63c2da0bca9e1bc181adb6eaa8bedc56f2f005 Mon Sep 17 00:00:00 2001 From: Jore Booy Date: Tue, 5 Apr 2022 15:31:45 +0200 Subject: [PATCH] Simple fix for support vite-ssg --- src/cache.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cache.ts b/src/cache.ts index a007489e..36079353 100644 --- a/src/cache.ts +++ b/src/cache.ts @@ -27,7 +27,7 @@ export function ensureInstance() { export function getServerInstance() { const instance = getCurrentInstance() - if (instance?.proxy.$isServer) + if (process.env.VITE_SSG || instance?.proxy.$isServer) return instance.proxy as InstanceType return false }