diff --git a/packages/vite/src/client/overlay.ts b/packages/vite/src/client/overlay.ts index 91ad9cc6fb95df..18c80a952b7b3f 100644 --- a/packages/vite/src/client/overlay.ts +++ b/packages/vite/src/client/overlay.ts @@ -1,5 +1,10 @@ import type { ErrorPayload } from 'types/hmrPayload' +// injected by the hmr plugin when served +declare const __BASE__: string + +const base = __BASE__ || '/' + // set :host styles to make playwright detect the element as visible const template = /*html*/ `