Skip to content
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

Merged
merged 6 commits into from
May 3, 2022
Merged

Feat/ssr manifest #3262

merged 6 commits into from
May 3, 2022

Conversation

thepassle
Copy link
Contributor

@thepassle thepassle commented May 3, 2022

Changes

  • What does this change?
    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

@changeset-bot
Copy link

changeset-bot bot commented May 3, 2022

🦋 Changeset detected

Latest commit: b05caf8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
astro Patch

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

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label May 3, 2022
@@ -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;
Copy link
Contributor

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

Copy link
Contributor Author

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.

@matthewp
Copy link
Contributor

matthewp commented May 3, 2022

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) pnpm changeset should provide the prompts.

@thepassle
Copy link
Contributor Author

I've added a changeset 👍

@matthewp matthewp merged commit adada1b into withastro:main May 3, 2022
@github-actions github-actions bot mentioned this pull request May 3, 2022
SiriousHunter pushed a commit to SiriousHunter/astro that referenced this pull request Feb 3, 2023
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants