[ci] format

This commit is contained in:
natemoo-re 2022-08-02 19:08:52 +00:00 committed by fredkbot
parent b60cc0538b
commit 59aa8d4283
3 changed files with 5 additions and 5 deletions

View file

@ -281,7 +281,7 @@ async function generatePath(
scripts.add({
props: { type: 'module', src },
children: '',
})
});
}
// Add all injected scripts to the page.

View file

@ -9,8 +9,8 @@ import type {
SSRElement,
SSRLoadedRenderer,
} from '../../../@types/astro';
import { PAGE_SCRIPT_ID } from '../../../vite-plugin-scripts/index.js';
import { prependForwardSlash } from '../../../core/path.js';
import { PAGE_SCRIPT_ID } from '../../../vite-plugin-scripts/index.js';
import { LogOptions } from '../../logger/core.js';
import { isPage } from '../../util.js';
import { render as coreRender } from '../core.js';

View file

@ -2,9 +2,9 @@ import { Plugin as VitePlugin } from 'vite';
import { AstroConfig } from '../@types/astro.js';
import { PAGE_SSR_SCRIPT_ID } from './index.js';
import { isPage } from '../core/util.js';
import ancestor from 'common-ancestor-path';
import MagicString from 'magic-string';
import { isPage } from '../core/util.js';
export default function astroScriptsPostPlugin({ config }: { config: AstroConfig }): VitePlugin {
function normalizeFilename(filename: string) {
@ -19,7 +19,7 @@ export default function astroScriptsPostPlugin({ config }: { config: AstroConfig
return {
name: 'astro:scripts:page-ssr',
enforce: 'post',
transform(this, code, id, options) {
if (!options?.ssr) return;
@ -44,7 +44,7 @@ export default function astroScriptsPostPlugin({ config }: { config: AstroConfig
return {
code: s.toString(),
map: s.generateMap(),
}
};
},
};
}