From 54344d7082a0740dd5c0264302156760ee413165 Mon Sep 17 00:00:00 2001 From: Cue Date: Fri, 11 Aug 2023 13:01:55 +0100 Subject: [PATCH] fix: find vite client path from subframe parent (#386) --- 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 b18885396f..3807c35ac5 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, [