@@ -26,10 +26,10 @@ export async function staticBuild(opts: StaticBuildOptions) {
2626
2727 // Verify this app is buildable.
2828 if ( isModeServerWithNoAdapter ( opts . astroConfig ) ) {
29- throw new Error ( `Cannot use mode : 'server' without an adapter. Please install and configure an adapter by setting it on the deploy configuration.
29+ throw new Error ( `Cannot use output : 'server' without an adapter. Please install and configure an adapter by setting it on the deploy configuration.
3030
3131export default {
32- mode : 'static',
32+ output : 'static',
3333 adapter: netlify(),
3434}` )
3535 }
@@ -69,7 +69,7 @@ export default {
6969 info (
7070 opts . logging ,
7171 'build' ,
72- `Building ${ astroConfig . mode } entrypoints...`
72+ `Building ${ astroConfig . output } entrypoints...`
7373 ) ;
7474 const ssrResult = ( await ssrBuild ( opts , internals , pageInput ) ) as RollupOutput ;
7575 info ( opts . logging , 'build' , dim ( `Completed in ${ getTimeStat ( timer . ssr , performance . now ( ) ) } .` ) ) ;
@@ -90,7 +90,7 @@ export default {
9090 await clientBuild ( opts , internals , clientInput ) ;
9191
9292 timer . generate = performance . now ( ) ;
93- if ( astroConfig . mode === 'static' ) {
93+ if ( astroConfig . output === 'static' ) {
9494 try {
9595 await generatePages ( ssrResult , opts , internals , facadeIdToPageDataMap ) ;
9696 } finally {
@@ -107,7 +107,7 @@ export default {
107107
108108async function ssrBuild ( opts : StaticBuildOptions , internals : BuildInternals , input : Set < string > ) {
109109 const { astroConfig, viteConfig } = opts ;
110- const ssr = astroConfig . mode === 'server' ;
110+ const ssr = astroConfig . output === 'server' ;
111111 const out = ssr ? opts . buildConfig . server : astroConfig . outDir ;
112112
113113 const viteBuildConfig : ViteConfigWithSSR = {
@@ -151,7 +151,7 @@ async function ssrBuild(opts: StaticBuildOptions, internals: BuildInternals, inp
151151 } ) ,
152152 ...( viteConfig . plugins || [ ] ) ,
153153 // SSR needs to be last
154- opts . astroConfig . mode === 'server' && vitePluginSSR ( internals , opts . astroConfig . _ctx . adapter ! ) ,
154+ opts . astroConfig . output === 'server' && vitePluginSSR ( internals , opts . astroConfig . _ctx . adapter ! ) ,
155155 vitePluginAnalyzer ( opts . astroConfig , internals ) ,
156156 ] ,
157157 publicDir : ssr ? false : viteConfig . publicDir ,
@@ -181,7 +181,7 @@ async function clientBuild(
181181) {
182182 const { astroConfig, viteConfig } = opts ;
183183 const timer = performance . now ( ) ;
184- const ssr = astroConfig . mode === 'server' ;
184+ const ssr = astroConfig . output === 'server' ;
185185 const out = ssr ? opts . buildConfig . client : astroConfig . outDir ;
186186
187187 // Nothing to do if there is no client-side JS.
@@ -282,7 +282,7 @@ async function copyFiles(fromFolder: URL, toFolder: URL) {
282282
283283async function ssrMoveAssets ( opts : StaticBuildOptions ) {
284284 info ( opts . logging , 'build' , 'Rearranging server assets...' ) ;
285- const serverRoot = opts . astroConfig . mode === 'static'
285+ const serverRoot = opts . astroConfig . output === 'static'
286286 ? opts . buildConfig . client
287287 : opts . buildConfig . server ;
288288 const clientRoot = opts . buildConfig . client ;
0 commit comments