From 560f084c9e0bef0f33a3db62607e7f92f69d9bb9 Mon Sep 17 00:00:00 2001 From: Cue Date: Fri, 11 Aug 2023 01:25:19 +0100 Subject: [PATCH] fix: find vite client path from subframe parent --- packages/devtools/client/composables/rpc.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/devtools/client/composables/rpc.ts b/packages/devtools/client/composables/rpc.ts index b18885396..3807c35ac 100644 --- a/packages/devtools/client/composables/rpc.ts +++ b/packages/devtools/client/composables/rpc.ts @@ -43,8 +43,8 @@ export const rpc = createBirpc(clientFunctions, { async function connectVite() { // @ts-expect-error no types - let base = window.__NUXT__.config?.app?.baseURL - const buildAssetsDir = window.__NUXT__?.config?.app.buildAssetsDir.replace(/^\/|\/$/g, '') ?? '_nuxt' + let base = window.parent.__NUXT__.config?.app?.baseURL + const buildAssetsDir = window.parent.__NUXT__?.config?.app.buildAssetsDir.replace(/^\/|\/$/g, '') ?? '_nuxt' if (base && !base.endsWith('/')) base += '/' const hot = await tryCreateHotContext(undefined, [