summaryrefslogtreecommitdiff
path: root/packages/integrations/partytown
diff options
context:
space:
mode:
Diffstat (limited to 'packages/integrations/partytown')
-rw-r--r--packages/integrations/partytown/src/index.ts13
-rw-r--r--packages/integrations/partytown/src/sirv.ts3
2 files changed, 13 insertions, 3 deletions
diff --git a/packages/integrations/partytown/src/index.ts b/packages/integrations/partytown/src/index.ts
index bddbeae62..ebd133e33 100644
--- a/packages/integrations/partytown/src/index.ts
+++ b/packages/integrations/partytown/src/index.ts
@@ -23,10 +23,19 @@ export default function createPlugin(): AstroIntegration {
config = _config;
},
'astro:server:setup': ({ server }) => {
- server.middlewares.use(sirv(partytownLibDirectory, { mount: '/~partytown', dev: true, etag: true, extensions: [] }));
+ server.middlewares.use(
+ sirv(partytownLibDirectory, {
+ mount: '/~partytown',
+ dev: true,
+ etag: true,
+ extensions: [],
+ })
+ );
},
'astro:build:done': async () => {
- await copyLibFiles(fileURLToPath(new URL('~partytown', config.outDir)), { debugDir: false });
+ await copyLibFiles(fileURLToPath(new URL('~partytown', config.outDir)), {
+ debugDir: false,
+ });
},
},
};
diff --git a/packages/integrations/partytown/src/sirv.ts b/packages/integrations/partytown/src/sirv.ts
index 860a715bf..aab0c7d96 100644
--- a/packages/integrations/partytown/src/sirv.ts
+++ b/packages/integrations/partytown/src/sirv.ts
@@ -223,7 +223,8 @@ export default function (dir, opts = {}) {
}
}
- let data = lookup(pathname, extns) || (isSPA && !isMatch(pathname, ignores) && lookup(fallback, extns));
+ let data =
+ lookup(pathname, extns) || (isSPA && !isMatch(pathname, ignores) && lookup(fallback, extns));
if (!data) return next ? next() : isNotFound(req, res);
if (isEtag && req.headers['if-none-match'] === data.headers['ETag']) {