-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
feat(node): experimentalDisableStreaming #14012
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
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
7ad62ff
test: node streaming false
florian-lefebvre a37b281
test
florian-lefebvre a9f032c
feat: clean
florian-lefebvre e6dcd8b
Merge branch 'main' into test/node-streaming-false
florian-lefebvre 92c64dc
feat: add tests
florian-lefebvre 93f385a
Merge branch 'test/node-streaming-false' of https://github.com/withas…
florian-lefebvre 1612b89
Update cold-cooks-battle.md
florian-lefebvre 0f2eb2a
Merge branch 'main' into test/node-streaming-false
florian-lefebvre b833214
chore: comment
florian-lefebvre 39b803b
Update cold-cooks-battle.md
florian-lefebvre 76921d3
Update cold-cooks-battle.md
florian-lefebvre b065a76
Merge branch 'main' into test/node-streaming-false
florian-lefebvre 4893aa9
Update .changeset/cold-cooks-battle.md
florian-lefebvre e26cd50
Update .changeset/cold-cooks-battle.md
florian-lefebvre b3def51
Merge remote-tracking branch 'origin/main' into test/node-streaming-f…
ematipico 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 hidden or 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,21 @@ | ||
| --- | ||
| '@astrojs/node': minor | ||
| --- | ||
|
|
||
| Adds a new experimental configuration option `experimentalDisableStreaming` to allow you to opt out of Astro's default [HTML streaming](https://docs.astro.build/en/guides/on-demand-rendering/#html-streaming) for pages rendered on demand. | ||
|
|
||
| HTML streaming helps with performance and generally provides a better visitor experience. In most cases, disabling streaming is not recommended. | ||
|
|
||
| However, when you need to disable HTML streaming (e.g. your host only supports non-streamed HTML caching at the CDN level), you can now opt out of the default behavior: | ||
|
|
||
| ```diff | ||
| import { defineConfig } from 'astro/config'; | ||
| import node from '@astrojs/node'; | ||
|
|
||
| export default defineConfig({ | ||
| adapter: node({ | ||
| mode: 'standalone', | ||
| + experimentalDisableStreaming: true, | ||
| }), | ||
| }); | ||
| ``` |
This file contains hidden or 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 hidden or 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
8 changes: 8 additions & 0 deletions
8
packages/integrations/node/test/fixtures/headers/src/pages/astro/component-simple.astro
This file contains hidden or 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,8 @@ | ||
| --- | ||
| import Wrapper from "../components/Wrapper.astro"; | ||
| import Wait from "../components/Wait.astro"; | ||
| --- | ||
|
|
||
| <Wrapper> | ||
| <Wait /> | ||
| </Wrapper> |
5 changes: 5 additions & 0 deletions
5
packages/integrations/node/test/fixtures/headers/src/pages/components/Wait.astro
This file contains hidden or 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 @@ | ||
| --- | ||
| await new Promise(r => setTimeout(r, 500)) | ||
| --- | ||
|
|
||
| <p>hello world</p> |
3 changes: 3 additions & 0 deletions
3
packages/integrations/node/test/fixtures/headers/src/pages/components/Wrapper.astro
This file contains hidden or 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,3 @@ | ||
| <div> | ||
| <slot /> | ||
| </div> |
This file contains hidden or 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 hidden or 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.
Uh oh!
There was an error while loading. Please reload this page.