fix: partytown base path (#5425)

* fix: partytown base path

* add changeset
This commit is contained in:
Brenley Dueck 2022-11-17 13:46:20 -06:00 committed by GitHub
parent 936c1e411d
commit 4266869f4f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
'@astrojs/partytown': patch
---
fix partytown when base path specified

View file

@ -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,