Skip to content

Commit

Permalink
fix: find vite client path from subframe parent (nuxt#386)
Browse files Browse the repository at this point in the history
  • Loading branch information
cuebit authored and Dev1436 committed Aug 12, 2023
1 parent 89c89a4 commit 54344d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/devtools/client/composables/rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ export const rpc = createBirpc<ServerFunctions>(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, [
Expand Down

0 comments on commit 54344d7

Please sign in to comment.