File tree Expand file tree Collapse file tree 2 files changed +17
-7
lines changed
packages/astro/src/vite-plugin-adapter-config Expand file tree Collapse file tree 2 files changed +17
-7
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' astro ' : patch
3+ ---
4+
5+ Fixes an issue where warnings would be logged during the build using one of the official adapters
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import type { Plugin as VitePlugin } from 'vite';
22import { isAstroServerEnvironment } from '../environments.js' ;
33import type { AstroSettings } from '../types/astro.js' ;
44import { fileURLToPath } from 'node:url' ;
5+ import { ASTRO_VITE_ENVIRONMENT_NAMES } from '../core/constants.js' ;
56
67// This is used by Cloudflare's optimizeDeps
78const VIRTUAL_CLIENT_ID = 'virtual:astro:adapter-config/client' ;
@@ -14,13 +15,17 @@ export function vitePluginAdapterConfig(settings: AstroSettings): VitePlugin {
1415 const { adapter } = settings ;
1516 if ( adapter && adapter . entrypointResolution === 'auto' && adapter . serverEntrypoint ) {
1617 return {
17- build : {
18- rollupOptions : {
19- input : {
20- index :
21- typeof adapter . serverEntrypoint === 'string'
22- ? adapter . serverEntrypoint
23- : fileURLToPath ( adapter . serverEntrypoint ) ,
18+ environments : {
19+ [ ASTRO_VITE_ENVIRONMENT_NAMES . ssr ] : {
20+ build : {
21+ rollupOptions : {
22+ input : {
23+ index :
24+ typeof adapter . serverEntrypoint === 'string'
25+ ? adapter . serverEntrypoint
26+ : fileURLToPath ( adapter . serverEntrypoint ) ,
27+ } ,
28+ } ,
2429 } ,
2530 } ,
2631 } ,
You can’t perform that action at this time.
0 commit comments