Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Sarah Rainsberger <[email protected]>
  • Loading branch information
Princesseuh and sarah11918 authored Sep 10, 2024
1 parent 1dfea7d commit 89a3a18
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .changeset/giant-rocks-thank.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
'astro': major
---

Merges the `output: 'hybrid'` and `output: 'static'` option. It is no longer necessary to specify `output: 'hybrid'` in your Astro config to use server rendered pages. Astro will now automatically determine if the build output should be static or hybrid based on the presence of server-rendered pages in your project.
Merges the `output: 'hybrid'` and `output: 'static'` configurations into one single configuration (now called `'static'`) that works the same way as the previous `hybrid` option.

If your project used hybrid rendering, you can now remove the `output: 'hybrid'` option from your Astro config. If you were using the `output: 'static'` option, you can continue to use it as before.
It is no longer necessary to specify `output: 'hybrid'` in your Astro config to use server-rendered pages. The new `output: 'static'` has this capability included. Astro will now automatically provide the ability to opt out of prerendering in your static site with no change to your `output` configuration required. Any page route or endpoint can include `export const prerender = false` to be server-rendered, while the rest of your site is statically-generated.

If your project used hybrid rendering, you must now remove the `output: 'hybrid'` option from your Astro config as it no longer exists. However, no other changes to your project are required, and you should have no breaking changes. The previous `'hybrid'` behavior is now the default, under a new name `'static'`.

If you were using the `output: 'static'` (default) option, you can continue to use it as before. By default, all of your pages will continue to be prerendered and you will have a completely static site. You should have no breaking changes to your project.

```diff
import { defineConfig } from "astro/config";
Expand All @@ -14,4 +18,4 @@ export default defineConfig({
});
```

An adapter is still required to deploy an Astro project with server-rendered pages, failure to include an adapter will result in a warning in development and an error at build time.
An adapter is still required to deploy an Astro project with any server-rendered pages. Failure to include an adapter will result in a warning in development and an error at build time.

0 comments on commit 89a3a18

Please sign in to comment.