diff --git a/packages/astro/src/core/build/vite-plugin-ssr.ts b/packages/astro/src/core/build/vite-plugin-ssr.ts index f3c333fa1..e0d6ca112 100644 --- a/packages/astro/src/core/build/vite-plugin-ssr.ts +++ b/packages/astro/src/core/build/vite-plugin-ssr.ts @@ -146,11 +146,11 @@ function buildManifest( ); } if (settings.scripts.some((script) => script.stage === 'page')) { - const src = entryModules[PAGE_SCRIPT_ID]; + const src = entryModules[PAGE_SCRIPT_ID]; scripts.push({ type: 'external', - value: joinBase(src) + value: joinBase(src), }); } diff --git a/packages/astro/test/ssr-request.test.js b/packages/astro/test/ssr-request.test.js index 08253a12a..276eb2551 100644 --- a/packages/astro/test/ssr-request.test.js +++ b/packages/astro/test/ssr-request.test.js @@ -18,10 +18,10 @@ describe('Using Astro.request in SSR', () => { name: 'inject-script', hooks: { 'astro:config:setup'({ injectScript }) { - injectScript('page', 'import "/src/scripts/inject-script.js";') - } - } - } + injectScript('page', 'import "/src/scripts/inject-script.js";'); + }, + }, + }, ], vite: { build: { @@ -74,13 +74,13 @@ describe('Using Astro.request in SSR', () => { const html = await response.text(); const $ = cheerioLoad(html); - for(const el of $('script')) { + for (const el of $('script')) { const scriptSrc = $(el).attr('src'); expect(scriptSrc.startsWith('/subpath/')).to.equal(true); request = new Request('http://example.com' + scriptSrc); response = await app.render(request); - + expect(response.status).to.equal(200); const js = await response.text(); expect(js).to.not.be.an('undefined');