-
Notifications
You must be signed in to change notification settings - Fork 1.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: Astro Assets via Sharp by default #3493
Conversation
🦋 Changeset detectedLatest commit: fb381b3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
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 |
This PR has wondered through the capability space and has finally settled on adopting a more dynamic and DX friendly approach with an easy "advanced" user path via the docs.
|
@bayssmekanique oops I forgot to send this after typing it up From what I gathered so far (I might be wrong), 3 ways to get Sharp to work:
I'm leaning towards 1 or 2 more. |
All in all, I think strategy (1) is the best approach, and that's basically what's represented in this PR. It works on the most environment and has the most maintainable path forward. Bundling in a version of A few things I started to work on but decided against: B) Making a separate Lambda for asset paths with the |
@@ -88,6 +87,7 @@ export default function createIntegration( | |||
updateConfig({ | |||
output: "server", | |||
}); | |||
config.output = "server"; |
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.
FWIW, this is ugly and I have a PR with Astro open to make it so the config can be returned after an update to the config: withastro/astro#9013
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.
This will be fixed once Astro v4 is released.
@bayssmekanique I'm a bit hesitate on adding a top level Let me know if it looks good, and I will merge it. |
@fwang, I understand the concern, though I would expect that before long there will likely be support for alternate runtime architectures on L@E. These reversions nullify the changes that fixed the asset handler. The issue is that without an architecture defined somewhere in the I've pushed another commit adding a top level default to the |
Set a default architecture for SsrFunction so bundler can correctly bundle resources.
I just merged Astro _image endpoint support to unpic in ascorbic/unpic#94, which means as soon as this PR lands, we’ll have support for Astro assets in all ui frameworks (react, preact, svelte, vue, solidjs, lit, qwik) with SST. Combined, this will be a game changer 😄 |
This PR adds the automatic creation of a Sharp layer for
AstroSite
deployments using Sharp for image processing. As part of this update, thesquoosh
compatibility has been dropped from the adapter as there is not a readily available Squoosh layer pakcage.This PR also fixes the issue of the adapter export (
aws()
) not having types due to thetypes.d.ts
definition file not being included in thedist
output.All changes in this PR should be backwards compatible and all configurations can be overwritten.