Skip to content

Commit dfe5af0

Browse files
authored
fix: add support for vite-ssg with process.env.VITE_SSG (#220)
1 parent 8e18fa2 commit dfe5af0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cache.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export function ensureInstance() {
2727
export function getServerInstance() {
2828
const instance = getCurrentInstance()
2929

30-
if (instance?.proxy.$isServer)
30+
if (process.env.VITE_SSG || instance?.proxy.$isServer)
3131
return instance.proxy as InstanceType<VueConstructor>
3232
return false
3333
}

0 commit comments

Comments
 (0)