diff options
Diffstat (limited to 'packages/astro/src/vite-plugin-astro-server/index.ts')
-rw-r--r-- | packages/astro/src/vite-plugin-astro-server/index.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/astro/src/vite-plugin-astro-server/index.ts b/packages/astro/src/vite-plugin-astro-server/index.ts index 86012991e..3449b7d3a 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, matchRoute } from '../core/routing/index.js'; -import { createSafeError, isBuildingToSSR, resolvePages } from '../core/util.js'; +import { createSafeError, resolvePages } from '../core/util.js'; import notFoundTemplate, { subpathNotUsedTemplate } from '../template/4xx.js'; interface AstroPluginOptions { @@ -205,7 +205,7 @@ async function handleRequest( ) { const reqStart = performance.now(); const origin = `${viteServer.config.server.https ? 'https' : 'http'}://${req.headers.host}`; - const buildingToSSR = isBuildingToSSR(config); + const buildingToSSR = config.output === 'server'; // Ignore `.html` extensions and `index.html` in request URLS to ensure that // routing behavior matches production builds. This supports both file and directory // build formats, and is necessary based on how the manifest tracks build targets. @@ -276,7 +276,7 @@ async function handleRequest( routeCache, pathname: pathname, logging, - ssr: isBuildingToSSR(config), + ssr: config.output === 'server', }); if (paramsAndPropsRes === GetParamsAndPropsError.NoMatchingStaticPath) { warn( |