-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
astro build environments #12872
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
base: v6
Are you sure you want to change the base?
astro build environments #12872
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1190,6 +1190,18 @@ declare global { | |
|
|
||
| Astro reserves the `astro:` prefix for future built-in hooks. Please choose a different prefix when naming your custom hook. | ||
|
|
||
| ## Astro vite environments | ||
|
|
||
| Since v6, Astro is based on `vite` v7 and it heavily uses its [environment APIs](https://vite.dev/guide/api-environment). | ||
|
|
||
| Astro build environments: | ||
| - `ssr`: the classic and default `ssr` environment of `vite`. Astro uses this environment to build dynamic routes. | ||
| - `client`: the classic and default `client` environment of `vite`. Astro uses this environment to generate client assets, such as scripts, styles, etc. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: Calling this and |
||
| - `prerender`: an environment that is created to build static pages. | ||
|
|
||
ematipico marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| If your integrations rely on `vite` environments and the Astro build, you might want to optimise based on these environments provided. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would link to Vite's docs on environment (which imo aren't great but its what we have). I might also mention that the primary thing you do with environment is apply config. |
||
|
|
||
| ## Integration types reference | ||
|
|
||
| ### `AstroIntegrationLogger` | ||
|
|
||
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.
It's also used for non-dynamic routes in dev.
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.
Do you think it's worth having a small paragraph for dev? At line 1197 I mention build
Uh oh!
There was an error while loading. Please reload this page.
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.
If the goal is to explain that Astro uses environments now I would probably explain it all together. If the goal is to explain how there's
prerenderas a special environment in the build, I would explain the reasoning for this documentation more. Like for example something like: