diff --git a/packages/astro/src/core/errors.ts b/packages/astro/src/core/errors.ts index 9b2c7c174..06940276b 100644 --- a/packages/astro/src/core/errors.ts +++ b/packages/astro/src/core/errors.ts @@ -51,7 +51,7 @@ export function fixViteErrorMessage(_err: unknown, server?: ViteDevServer, fileP try { server?.ssrFixStacktrace(err); } catch {} - + // Fix: Astro.glob() compiles to import.meta.glob() by the time Vite sees it, // so we need to update this error message in case it originally came from Astro.glob(). if (err.message === 'import.meta.glob() can only accept string literals.') { diff --git a/packages/astro/src/vite-plugin-astro-server/index.ts b/packages/astro/src/vite-plugin-astro-server/index.ts index 05f2b893a..5d46d463c 100644 --- a/packages/astro/src/vite-plugin-astro-server/index.ts +++ b/packages/astro/src/vite-plugin-astro-server/index.ts @@ -20,7 +20,7 @@ import { preload, ssr } from '../core/render/dev/index.js'; import { RouteCache } from '../core/render/route-cache.js'; import { createRequest } from '../core/request.js'; import { createRouteManifest, matchAllRoutes } from '../core/routing/index.js'; -import { createSafeError, resolvePages } from '../core/util.js'; +import { resolvePages } from '../core/util.js'; import notFoundTemplate, { subpathNotUsedTemplate } from '../template/4xx.js'; interface AstroPluginOptions { diff --git a/packages/astro/test/error-bad-js.test.js b/packages/astro/test/error-bad-js.test.js index 0f4c12e6d..4315add2c 100644 --- a/packages/astro/test/error-bad-js.test.js +++ b/packages/astro/test/error-bad-js.test.js @@ -16,14 +16,14 @@ describe('Errors in JavaScript', () => { devServer = await fixture.startDevServer(); }); - after(async() => { + after(async () => { await devServer.stop(); }); it('Does not crash the dev server', async () => { let res = await fixture.fetch('/'); let html = await res.text(); - + expect(html).to.include('ReferenceError'); res = await fixture.fetch('/');