diff --git a/packages/astro/src/core/build/generate.ts b/packages/astro/src/core/build/generate.ts index cbd8e1c2e..ee398b99f 100644 --- a/packages/astro/src/core/build/generate.ts +++ b/packages/astro/src/core/build/generate.ts @@ -281,7 +281,7 @@ async function generatePath( scripts.add({ props: { type: 'module', src }, children: '', - }) + }); } // Add all injected scripts to the page. diff --git a/packages/astro/src/core/render/dev/index.ts b/packages/astro/src/core/render/dev/index.ts index 6cf75a6cc..c9e64dfb4 100644 --- a/packages/astro/src/core/render/dev/index.ts +++ b/packages/astro/src/core/render/dev/index.ts @@ -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'; diff --git a/packages/astro/src/vite-plugin-scripts/page-ssr.ts b/packages/astro/src/vite-plugin-scripts/page-ssr.ts index 1f726912e..9aa3425f5 100644 --- a/packages/astro/src/vite-plugin-scripts/page-ssr.ts +++ b/packages/astro/src/vite-plugin-scripts/page-ssr.ts @@ -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(), - } + }; }, }; }