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: Use netlify adapter with edge functions #517

Merged
merged 5 commits into from
Dec 18, 2023
Merged

feat: Use netlify adapter with edge functions #517

merged 5 commits into from
Dec 18, 2023

Conversation

lachlancollins
Copy link
Collaborator

@lachlancollins lachlancollins commented Dec 17, 2023

🎯 Changes

Use Netlify edge functions rather than static adapter: https://kit.svelte.dev/docs/adapter-netlify#netlify-edge-functions

✅ Checklist

  • I have given my PR a descriptive title
  • I have run pnpm run lint locally on my changes

Copy link

netlify bot commented Dec 17, 2023

Deploy Preview for sveltesociety-preview ready!

Name Link
🔨 Latest commit f19479d
🔍 Latest deploy log https://app.netlify.com/sites/sveltesociety-preview/deploys/657fbf496f9194000802ffff
😎 Deploy Preview https://deploy-preview-517--sveltesociety-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@lachlancollins lachlancollins changed the title Test netlify edge functions feat: Use netlify adapter with edge functions Dec 17, 2023
@lachlancollins lachlancollins marked this pull request as ready for review December 17, 2023 11:15
@MacFJA
Copy link
Collaborator

MacFJA commented Dec 17, 2023

What are the advantages of using Netlify Edge over the Static generation ?

@lachlancollins
Copy link
Collaborator Author

lachlancollins commented Dec 17, 2023

What are the advantages of using Netlify Edge over the Static generation ?

For this PR, there should be no change at all from adapter-static to adapter-netlify, since all pages are still prerendered and therefore rapidly served as html via the same netlify CDN. This is what I've observed from the deploy preview.

However, with a non-static adapter, it would be possible to add server-side logic in the future (e.g. could process large JSON files server-side and only send what is necessary to the browser). Effectively, adapter-netlify seems to be a superset of adapter-static with the current setup.

@lachlancollins lachlancollins merged commit 2054e0b into svelte-society:main Dec 18, 2023
5 checks passed
@lachlancollins lachlancollins deleted the netlify-edge-test branch December 18, 2023 04:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants