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 #12560

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Jacob-Roberts
Copy link

Note

This is moved from #12320 to point to the main branch

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.

I have added an test that ensures that the build output contains the base URL that we specify.

Docs

Docs are added in withastro/docs#10106 that explain to integration authors this new config option.

Copy link

changeset-bot bot commented Nov 28, 2024

🦋 Changeset detected

Latest commit: 1376964

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 semver: minor Change triggers a `minor` release labels Nov 28, 2024
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is blocked because it contains a minor changeset. A reviewer will merge this at the next release if approved.

Copy link

codspeed-hq bot commented Nov 28, 2024

CodSpeed Performance Report

Merging #12560 will degrade performances by 86.4%

Comparing Jacob-Roberts:Jacob-Roberts-dynamic-static-split-core (1376964) with main (c50882d)

Summary

❌ 2 regressions
✅ 4 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main Jacob-Roberts:Jacob-Roberts-dynamic-static-split-core Change
Rendering: streaming [false], .astro file 1.5 s 1.8 s -13.86%
Rendering: streaming [false], .md file 22.4 ms 164.7 ms -86.4%

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) semver: minor Change triggers a `minor` release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant