[ci] format

This commit is contained in:
natemoo-re 2022-05-16 18:32:54 +00:00 committed by github-actions[bot]
parent 31b0bc87a4
commit 58cca31e79

View file

@ -7,12 +7,14 @@ import { createRequire } from 'module';
import path from 'path';
const resolve = createRequire(import.meta.url).resolve;
type PartytownOptions = {
config?: {
forward?: string[];
debug?: boolean;
}
} | undefined;
type PartytownOptions =
| {
config?: {
forward?: string[];
debug?: boolean;
};
}
| undefined;
export default function createPlugin(options: PartytownOptions): AstroIntegration {
let config: AstroConfig;
@ -23,8 +25,8 @@ export default function createPlugin(options: PartytownOptions): AstroIntegratio
name: '@astrojs/partytown',
hooks: {
'astro:config:setup': ({ config: _config, command, injectScript }) => {
const forward = options?.config?.forward || []
const debug = options?.config?.debug || command === 'dev'
const forward = options?.config?.forward || [];
const debug = options?.config?.debug || command === 'dev';
partytownSnippetHtml = partytownSnippet({ debug, forward });
injectScript('head-inline', partytownSnippetHtml);
},