[ci] format
This commit is contained in:
parent
3dc68e148e
commit
9c98ba81e1
3 changed files with 11 additions and 4 deletions
|
@ -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.
|
||||
|
|
|
@ -12,7 +12,7 @@ export interface RouteInfo {
|
|||
routeData: RouteData;
|
||||
file: string;
|
||||
links: string[];
|
||||
scripts: Array<string | {children: string, stage: string}>;
|
||||
scripts: Array<string | { children: string; stage: string }>;
|
||||
}
|
||||
|
||||
export type SerializedRouteInfo = Omit<RouteInfo, 'routeData'> & {
|
||||
|
|
|
@ -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),
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue