Skip to content

Commit

Permalink
fix: find vite client path from subframe parent (#386)
Browse files Browse the repository at this point in the history
  • Loading branch information
cuebit authored Aug 11, 2023
1 parent de59d6e commit e28606a
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 e28606a

Please sign in to comment.