From 9c98ba81e1cde14a3772cbc9ee020956dae996e8 Mon Sep 17 00:00:00 2001 From: matthewp Date: Wed, 11 May 2022 14:54:52 +0000 Subject: [PATCH] [ci] format --- packages/astro/src/core/app/index.ts | 6 ++++-- packages/astro/src/core/app/types.ts | 2 +- packages/astro/src/core/build/vite-plugin-ssr.ts | 7 ++++++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/astro/src/core/app/index.ts b/packages/astro/src/core/app/index.ts index b963b5794..a53c1c062 100644 --- a/packages/astro/src/core/app/index.ts +++ b/packages/astro/src/core/app/index.ts @@ -78,8 +78,10 @@ export class App { const renderers = manifest.renderers; const info = this.#routeDataToRouteInfo.get(routeData!)!; const links = createLinkStylesheetElementSet(info.links, manifest.site); - - const filteredScripts = info.scripts.filter(script => typeof script !== 'string' && script?.stage !== 'head-inline') as string[]; + + const filteredScripts = info.scripts.filter( + (script) => typeof script !== 'string' && script?.stage !== 'head-inline' + ) as string[]; const scripts = createModuleScriptElementWithSrcSet(filteredScripts, manifest.site); // Add all injected scripts to the page. diff --git a/packages/astro/src/core/app/types.ts b/packages/astro/src/core/app/types.ts index 6a5b55760..063f33b7f 100644 --- a/packages/astro/src/core/app/types.ts +++ b/packages/astro/src/core/app/types.ts @@ -12,7 +12,7 @@ export interface RouteInfo { routeData: RouteData; file: string; links: string[]; - scripts: Array; + scripts: Array; } export type SerializedRouteInfo = Omit & { diff --git a/packages/astro/src/core/build/vite-plugin-ssr.ts b/packages/astro/src/core/build/vite-plugin-ssr.ts index 38b30b3df..1a4a0d291 100644 --- a/packages/astro/src/core/build/vite-plugin-ssr.ts +++ b/packages/astro/src/core/build/vite-plugin-ssr.ts @@ -109,7 +109,12 @@ function buildManifest( routes.push({ file: '', links: Array.from(pageData.css), - scripts: [...scripts, ...astroConfig._ctx.scripts.filter(script => script.stage === 'head-inline').map(({stage, content}) => ({stage, children: content}))], + scripts: [ + ...scripts, + ...astroConfig._ctx.scripts + .filter((script) => script.stage === 'head-inline') + .map(({ stage, content }) => ({ stage, children: content })), + ], routeData: serializeRouteData(pageData.route), }); }