-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the output
option
#4015
Merged
Merged
Add the output
option
#4015
Changes from 17 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
13db5ba
Start of work on astroConfig.mode === 'server'
FredKSchott d1bc9ee
Add tests and more
matthewp c873d9c
adapter -> deploy in some places
matthewp 3e978e1
Add fallback for `adapter` config
matthewp 2242088
Update more tests
matthewp 5a4b66e
Update image tests
matthewp 511687a
Fix clientAddress test
matthewp 570a9f3
Updates based on PR review
matthewp fa48c4e
Add a changeset
matthewp 9346891
Update integrations tests + readme
matthewp 4d06b4f
Oops
matthewp 7125952
Remove old option
matthewp a5ffe45
Rename `mode` to `output`
matthewp 0ac763f
Merge branch 'main' into new-adapter-api-2
matthewp 9634907
Update Node adapter test
matthewp cf6e970
Merge branch 'main' into new-adapter-api-2
matthewp 5aab8d0
Update test
matthewp 9082c5a
Merge branch 'main' into new-adapter-api-2
FredKSchott 6f3a8b8
fred pass
FredKSchott 3b84aae
fred pass
FredKSchott b4ec13e
fred pass
FredKSchott 3d179ab
fix test
FredKSchott File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 `output: '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(), | ||
+ output: 'server', | ||
}); | ||
``` |
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,5 @@ | ||
--- | ||
'astro': patch | ||
matthewp marked this conversation as resolved.
Show resolved
Hide resolved
|
||
--- | ||
|
||
Update "astro add" output to remove confusing multi-select prompt. |
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,5 @@ | ||
--- | ||
'astro': patch | ||
--- | ||
|
||
Update the help output to improve formatting |
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
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
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
This file was deleted.
Oops, something went wrong.
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
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
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
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changeset needs to be updated to refer to
output