diff --git a/src/integration/api.md b/src/integration/api.md index 6c611911..c2891e22 100644 --- a/src/integration/api.md +++ b/src/integration/api.md @@ -32,6 +32,8 @@ export interface PartytownConfig { logSendBeaconRequests?: boolean; logSetters?: boolean; logStackTraces?: boolean; + // (undocumented) + mainWindowAccessors?: string[]; resolveUrl?(url: URL, location: Location): URL | undefined | null; // (undocumented) set?: SetHook; diff --git a/src/utils/vite.ts b/src/utils/vite.ts index 0d320c30..bcc1bee7 100644 --- a/src/utils/vite.ts +++ b/src/utils/vite.ts @@ -32,7 +32,7 @@ export function partytownVite(opts: PartytownViteOptions) { const url = req.url ?? ''; // drop query const [pathname] = url.split('?'); - if (pathname.includes('partytown')) { + if (pathname.includes('partytown') && !pathname.includes('.vite')) { const fileName = pathname.split('/').pop(); if (fileName && fileName.endsWith('.js')) { const libDir = libDirPath({ debugDir: pathname.includes('/debug/') });