fix: 🩹 update partytown options ts type (#7175)
This commit is contained in:
parent
dc31b8a722
commit
59d8c50b84
2 changed files with 9 additions and 6 deletions
5
.changeset/curvy-hotels-study.md
Normal file
5
.changeset/curvy-hotels-study.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@astrojs/partytown': patch
|
||||
---
|
||||
|
||||
fix typescript type for partytown options
|
|
@ -9,17 +9,15 @@ import { fileURLToPath } from 'url';
|
|||
import sirv from './sirv.js';
|
||||
const resolve = createRequire(import.meta.url).resolve;
|
||||
|
||||
type PartytownOptions =
|
||||
| {
|
||||
config?: PartytownConfig;
|
||||
}
|
||||
| undefined;
|
||||
type PartytownOptions = {
|
||||
config?: PartytownConfig;
|
||||
};
|
||||
|
||||
function appendForwardSlash(str: string) {
|
||||
return str.endsWith('/') ? str : str + '/';
|
||||
}
|
||||
|
||||
export default function createPlugin(options: PartytownOptions): AstroIntegration {
|
||||
export default function createPlugin(options?: PartytownOptions): AstroIntegration {
|
||||
let config: AstroConfig;
|
||||
let partytownSnippetHtml: string;
|
||||
const partytownEntrypoint = resolve('@builder.io/partytown/package.json');
|
||||
|
|
Loading…
Reference in a new issue