summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Florian Lefebvre <contact@florian-lefebvre.dev> 2023-10-27 11:54:41 +0200
committerGravatar GitHub <noreply@github.com> 2023-10-27 17:54:41 +0800
commite21fef7da2292414f55b58ffe7d9bbfd25904ca3 (patch)
tree296807f19b62d287986dc8b3154bb1b379760c7c
parent01c801108f1f5429436e4fc930018bf96ed31f79 (diff)
downloadastro-e21fef7da2292414f55b58ffe7d9bbfd25904ca3.tar.gz
astro-e21fef7da2292414f55b58ffe7d9bbfd25904ca3.tar.zst
astro-e21fef7da2292414f55b58ffe7d9bbfd25904ca3.zip
fix(partytown): allow overriding the lib option (close #8760) (#8892)
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
-rw-r--r--.changeset/forty-eggs-raise.md5
-rw-r--r--packages/integrations/partytown/src/index.ts2
2 files changed, 6 insertions, 1 deletions
diff --git a/.changeset/forty-eggs-raise.md b/.changeset/forty-eggs-raise.md
new file mode 100644
index 000000000..a5acddde6
--- /dev/null
+++ b/.changeset/forty-eggs-raise.md
@@ -0,0 +1,5 @@
+---
+'@astrojs/partytown': patch
+---
+
+Adds the ability to override the `lib` option in `astro.config.mjs`
diff --git a/packages/integrations/partytown/src/index.ts b/packages/integrations/partytown/src/index.ts
index 755026512..cfe1293c9 100644
--- a/packages/integrations/partytown/src/index.ts
+++ b/packages/integrations/partytown/src/index.ts
@@ -27,8 +27,8 @@ export default function createPlugin(options?: PartytownOptions): AstroIntegrati
'astro:config:setup': ({ config: _config, command, injectScript }) => {
const lib = `${appendForwardSlash(_config.base)}~partytown/`;
const partytownConfig = {
- ...options?.config,
lib,
+ ...options?.config,
debug: options?.config?.debug ?? command === 'dev',
};
partytownSnippetHtml = partytownSnippet(partytownConfig);