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

Prevent bundling sharp #8196

Merged
merged 1 commit into from
Aug 23, 2023
Merged

Prevent bundling sharp #8196

merged 1 commit into from
Aug 23, 2023

Conversation

bluwy
Copy link
Member

@bluwy bluwy commented Aug 23, 2023

Changes

sharp can't be bundled and it fails in runtime if so. It's bundled by default with pnpm unless the user installs sharp themselves.

Testing

I'm updating some dependencies and it causes the Vercel test to OOM, this fixes it.

I also tested this with the ssr example app and it still works.

Docs

n/a. bug fix.

@changeset-bot
Copy link

changeset-bot bot commented Aug 23, 2023

🦋 Changeset detected

Latest commit: 4d89b6e

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 the pkg: astro Related to the core `astro` package (scope) label Aug 23, 2023
Copy link
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

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

Maybe for later, but we should update the relative README.md that explains the plugins.

@bluwy
Copy link
Member Author

bluwy commented Aug 23, 2023

Yeah. I think this place isn't quite right to set the external/noExternal too, I'd probably put it in static-build.ts ssrBuild directly, but it's hard to merge it in with the user config.

I could tweak Vite's mergeConfig API so that it works better though and we can put it in that file later though.

@bluwy bluwy merged commit 632579d into next Aug 23, 2023
13 checks passed
@bluwy bluwy deleted the no-bundle-sharp branch August 23, 2023 09:52
This was referenced Aug 23, 2023
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.

None yet

2 participants