From 4266869f4fef37fadb2e0c4c0b703decde11037a Mon Sep 17 00:00:00 2001 From: Brenley Dueck Date: Thu, 17 Nov 2022 13:46:20 -0600 Subject: [PATCH] fix: partytown base path (#5425) * fix: partytown base path * add changeset --- .changeset/popular-melons-pretend.md | 5 +++++ packages/integrations/partytown/src/index.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/popular-melons-pretend.md diff --git a/.changeset/popular-melons-pretend.md b/.changeset/popular-melons-pretend.md new file mode 100644 index 000000000000..60859e5f32f2 --- /dev/null +++ b/.changeset/popular-melons-pretend.md @@ -0,0 +1,5 @@ +--- +'@astrojs/partytown': patch +--- + +fix partytown when base path specified diff --git a/packages/integrations/partytown/src/index.ts b/packages/integrations/partytown/src/index.ts index 44ffbe3106f7..eed0ab7c537e 100644 --- a/packages/integrations/partytown/src/index.ts +++ b/packages/integrations/partytown/src/index.ts @@ -36,7 +36,7 @@ export default function createPlugin(options: PartytownOptions): AstroIntegratio config = _config; }, 'astro:server:setup': ({ server }) => { - const lib = `${config.base}~partytown/`; + const lib = `/~partytown/`; server.middlewares.use( sirv(partytownLibDirectory, { mount: lib,