0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-20 22:12:38 -05:00

[ci] format

This commit is contained in:
Matthew Phillips 2024-08-14 17:31:27 +00:00 committed by astrobot-houston
parent 3d8ae767fd
commit 3adb473cdf
2 changed files with 7 additions and 4 deletions

View file

@ -32,7 +32,7 @@ function vitePluginAdapter(adapter: AstroAdapter): VitePlugin {
} }
}, },
async load(id) { async load(id) {
if(id === RESOLVED_ADAPTER_VIRTUAL_MODULE_ID) { if (id === RESOLVED_ADAPTER_VIRTUAL_MODULE_ID) {
return `export * from '${adapter.serverEntrypoint}';`; return `export * from '${adapter.serverEntrypoint}';`;
} }
}, },
@ -145,7 +145,7 @@ export function pluginSSR(
? vitePluginSSR(internals, adapter, options) ? vitePluginSSR(internals, adapter, options)
: undefined; : undefined;
const vitePlugin = [vitePluginAdapter(adapter)]; const vitePlugin = [vitePluginAdapter(adapter)];
if(ssrPlugin) { if (ssrPlugin) {
vitePlugin.unshift(ssrPlugin); vitePlugin.unshift(ssrPlugin);
} }
@ -262,7 +262,7 @@ export function pluginSSRSplit(
? vitePluginSSRSplit(internals, adapter, options) ? vitePluginSSRSplit(internals, adapter, options)
: undefined; : undefined;
const vitePlugin = [vitePluginAdapter(adapter)]; const vitePlugin = [vitePluginAdapter(adapter)];
if(ssrPlugin) { if (ssrPlugin) {
vitePlugin.unshift(ssrPlugin); vitePlugin.unshift(ssrPlugin);
} }

View file

@ -61,7 +61,10 @@ describe('astro:ssr-manifest, split', () => {
}); });
it('should correctly emit the the pre render page', async () => { it('should correctly emit the the pre render page', async () => {
const indexUrl = new URL('./fixtures/ssr-split-manifest/dist/client/prerender/index.html', import.meta.url); const indexUrl = new URL(
'./fixtures/ssr-split-manifest/dist/client/prerender/index.html',
import.meta.url,
);
const text = readFileSync(indexUrl, { const text = readFileSync(indexUrl, {
encoding: 'utf8', encoding: 'utf8',
}); });