diff --git a/.changeset/forty-eggs-raise.md b/.changeset/forty-eggs-raise.md new file mode 100644 index 000000000000..0278a97d031b --- /dev/null +++ b/.changeset/forty-eggs-raise.md @@ -0,0 +1,5 @@ +--- +'@astrojs/partytown': patch +--- + +Allows overriding the `lib` option diff --git a/packages/integrations/partytown/src/index.ts b/packages/integrations/partytown/src/index.ts index 755026512399..cfe1293c995d 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);