Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

Commit d81806a

Browse files
authored
fix(netlify): externalise sharp when bundling edge middleware (#316)
* fix(netlify): externalise sharp when bundling edge middleware * Deps
1 parent 1f781f2 commit d81806a

File tree

4 files changed

+203
-19
lines changed

4 files changed

+203
-19
lines changed

.changeset/shy-ties-float.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@astrojs/netlify': patch
3+
---
4+
5+
Fixes a regression where edge middleware tried to bundle node builtins

packages/netlify/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"@netlify/edge-functions": "^2.0.0",
4646
"@netlify/edge-handler-types": "^0.34.1",
4747
"@types/node": "^18.17.8",
48-
"astro": "^4.10.1",
48+
"astro": "^4.11.3",
4949
"astro-scripts": "workspace:*",
5050
"cheerio": "1.0.0-rc.12",
5151
"execa": "^8.0.1",

packages/netlify/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,7 @@ export default function netlifyIntegration(
309309
format: 'esm',
310310
bundle: true,
311311
minify: false,
312+
external: ['sharp'],
312313
banner: {
313314
// Import Deno polyfill for `process.env` at the top of the file
314315
js: 'import process from "node:process";',

0 commit comments

Comments
 (0)