[ci] format
This commit is contained in:
parent
31b0bc87a4
commit
58cca31e79
1 changed files with 10 additions and 8 deletions
|
@ -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);
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue