0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-03-31 23:31:30 -05:00

fix(partytown): allow overriding the lib option (close #8760) (#8892)

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
This commit is contained in:
Florian Lefebvre 2023-10-27 11:54:41 +02:00 committed by GitHub
parent 01c801108f
commit e21fef7da2
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
---
Adds the ability to override the `lib` option in `astro.config.mjs`

View file

@ -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);