-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Experimental Prerender API #5297
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 41 commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
ada9899
wip: hybrid output
natemoo-re 4a7ddbc
wip: hybrid output mvp
natemoo-re a1e660c
refactor: move hybrid => server
natemoo-re df4af7e
wip: hybrid support for `output: 'server'`
natemoo-re cce444d
feat(hybrid): overwrite static files
natemoo-re 972106f
fix: update static build
natemoo-re 600b5f2
feat(hybrid): skip page generation if no static entrypoints
natemoo-re f135155
feat: migrate from hybrid output => prerender flag
natemoo-re d88a9af
fix: appease typescript
natemoo-re b9c69c3
fix: appease typescript
natemoo-re b88f2aa
fix: appease typescript
natemoo-re 2acf3a8
fix: appease typescript
natemoo-re 2412fab
fix: improve static cleanup
natemoo-re fd70e94
attempt: avoid preprocess scanning
natemoo-re 5aab0b5
hack: force generated .js files to be treated as ESM
natemoo-re 76e14f6
better handling for astro metadata
natemoo-re 49e14ab
fix: update scanner plugin
natemoo-re 0663dfa
fix: page name bug
natemoo-re 5133b03
fix: keep ssr false when generating pages
natemoo-re b1fe3f4
fix: force output to be treated as ESM
natemoo-re 6835c6d
fix: client output should respect buildConfig
natemoo-re e202954
fix: ensure outDir is always created
natemoo-re 126c979
fix: do not replace files with noop
natemoo-re f3af698
fix(netlify): add support for `experimental_prerender` pages
natemoo-re 8dbd664
feat: switch to `experimental_prerender`
natemoo-re 5d5b240
chore: update es-module-lexer code in test
natemoo-re c4274db
feat: improved code-splitting, cleanup
natemoo-re 163cea4
feat: move prerender behind flag
natemoo-re 035c376
test: prerender
natemoo-re 2f90932
test: update prerender test
natemoo-re a7c6d34
chore: update lockfile
natemoo-re ed43e8c
fix: only match `.html` files when resolving assets
natemoo-re 5c8ba60
chore: update changeset
natemoo-re 2028e45
chore: remove ESM hack
natemoo-re 9e4a190
chore: allow `--experimental-prerender` flag, move `--experimental-er…
natemoo-re 02e616f
chore: update changeset
natemoo-re 08e2d98
test(vite-plugin-scanner): add proper unit tests for vite-plugin-scanner
natemoo-re 0c9ea57
chore: remove leftover code
natemoo-re 7aa1914
chore: add comment on cleanup task
natemoo-re ecc44ab
refactor: move manual chunks logic to vite-plugin-prerender
natemoo-re d1546a2
fix: do not support let declarations
natemoo-re b17b6dd
test: add var test
natemoo-re c233008
refactor: prefer existing util
natemoo-re 490eefe
Update packages/astro/src/@types/astro.ts
natemoo-re 1ac3eff
Update packages/astro/src/core/errors/errors-data.ts
natemoo-re fc51dd8
Update packages/astro/src/@types/astro.ts
natemoo-re 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,17 @@ | ||
--- | ||
'astro': minor | ||
'@astrojs/netlify': minor | ||
--- | ||
|
||
Introduces the **experimental** Prerender API. | ||
|
||
> **Note** | ||
> This API is not yet stable and is subject to possible breaking changes! | ||
|
||
- Deploy an Astro server without sacrificing the speed or cacheability of static HTML. | ||
- The Prerender API allows you to statically prerender specific `pages/` at build time. | ||
|
||
**Usage** | ||
|
||
- First, run `astro build --experimental-prerender` or enable `experimental: { prerender: true }` in your `astro.config.mjs` file. | ||
- Then, include `export const prerender = true` in any file in the `pages/` directory that you wish to prerender. |
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
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
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
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
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.