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: Allow integrations to change the base for server-islands URLs #12320

Draft
wants to merge 3 commits into
base: next
Choose a base branch
from

Conversation

Jacob-Roberts
Copy link

See proposal withastro/roadmap#1043 to see the full reasoning behind this change.

This PR only contains the required changes to enable an integration to be built. However, I created a draft PR that shows an integration and the example that uses it #12304. Please look at that PR to see the full desired impact of this change.

Changes

  • Allow changing the domain that the server islands are hosted on.
  • Allow developers to split the "static" part and the "dynamic" part of their website fully.
  • Allows developers that cannot give Cloudflare the ability to read their customer's data to still use Astro's great site builder.
  • Use a specific integration so we don't pollute the main astro config.

With config:
Screenshot 2024-10-28 at 9 02 01 PM

Result:
Screenshot 2024-10-25 at 11 00 17 PM

Testing

A manual test has been run in the separate PR. No automated tests have been added.

Because this is a niche use-case I wanted to get feedback from the team before adding tests for it. If it is desirable, I will add an e2e test that creates a new server island fixture to test this.

Docs

No docs are needed for this as this is a very niche configuration option. We don't want to clutter the main astro config, hence why I didn't add the config to the "public" user-facing config. If this is something we want to override, let's only allow it to be overriden from an integration level.

Copy link

changeset-bot bot commented Oct 28, 2024

🦋 Changeset detected

Latest commit: be58dea

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

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 pkg: astro Related to the core `astro` package (scope) docs pr labels Oct 28, 2024
@Jacob-Roberts Jacob-Roberts marked this pull request as ready for review October 29, 2024 02:15
@ematipico
Copy link
Member

@Jacob-Roberts

If you're looking for feedback, please make the PR a draft. As you said, the PR isn't meant to be ready because tests are missing.

Also, regardless of the entity of the feature, docs must be provided to the user.

@ematipico ematipico marked this pull request as draft October 29, 2024 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs pr pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants