-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Feat/ssr manifest #3262
Feat/ssr manifest #3262
Conversation
🦋 Changeset detectedLatest commit: b05caf8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@@ -1,6 +1,9 @@ | |||
import type { SSRManifest, SerializedSSRManifest, RouteInfo } from './types'; | |||
import { deserializeRouteData } from '../routing/manifest/serialization.js'; | |||
|
|||
export const pagesVirtualModuleId = '@astrojs-pages-virtual-entry'; | |||
export const resolvedPagesVirtualModuleId = '\0' + pagesVirtualModuleId; |
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.
Didn't you say these variables are the ones you need access to? If so they need to be re-exported in app/index.ts
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.
Woops, I thought they'd be available in common.ts. I've moved them to app/index.ts.
Thanks! I can probably push a test. Can you move your comments into the Changes, Testing, and Docs section of the PR? Also will need a changeset (patch since we are in the beta phase) |
I've added a changeset 👍 |
* feat: expose pagesVirtualModuleId * feat: add astro:build:ssr hook * fix: missing import for pagesVirtualModuleId * test: fix tests * refactor: move exports to index.ts * chore: changeset
Changes
This adds a new integration hook
astro:build:ssr
as discussed in Service Worker Side Rendering roadmap#188 (reply in thread) that gets passed the SSR Manifest. This is useful for creating custom builds of Astro in plugins/integrations, like for example bundling Astro as a service worker.Testing
Test added by Matthew, and also tested changes locally
Docs
I created a PR for the docs here: withastro/docs#427