-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
'astro': minor | ||
'@astrojs/cloudflare': minor | ||
'@astrojs/deno': minor | ||
'@astrojs/image': minor | ||
'@astrojs/netlify': minor | ||
'@astrojs/node': minor | ||
'@astrojs/sitemap': minor | ||
'@astrojs/vercel': minor | ||
--- | ||
|
||
New `mode` configuration option | ||
|
||
This change introduces a new configuration option `mode`. Mode can be either | ||
|
||
* `static` - The default, when building a static site. | ||
* `server` - When building an app to be deployed for SSR (server-side rendering). | ||
|
||
The default, `static`, can be omitted from your config file. | ||
|
||
If you want to use SSR you now need to provide `mode: 'server'` *in addition* to an adapter. | ||
|
||
The `adapter` configuration has been renamed to `deploy`. In the future adapters will support configuring a static site as well! | ||
|
||
For SSR make this change: | ||
|
||
```diff | ||
import { defineConfig } from 'astro/config'; | ||
import netlify from '@astrojs/netlify/functions'; | ||
|
||
export default defineConfig({ | ||
- adapter: netlify(), | ||
+ deploy: netlify(), | ||
+ mode: 'server', | ||
}); | ||
``` |