Skip to content

Commit ef4948b

Browse files
authored
fix(dev-overrides): Make Image optimization work locally (opennextjs#966)
* fix(fs-dev): Make Image optimization work locally * changeset * review
1 parent 01f8461 commit ef4948b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.changeset/long-ears-worry.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@opennextjs/aws": patch
3+
---
4+
5+
fix(fs-dev): Make Image optimization work locally

packages/open-next/src/build/createImageOptimizationBundle.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ export async function createImageOptimizationBundle(
116116
outputPath,
117117
config.imageOptimization?.install ?? {
118118
packages: [`sharp@${sharpVersion}`],
119-
arch: "arm64",
119+
// By not specifying an arch, `npm install` will choose one for us (i.e. our system one)
120+
arch: config.imageOptimization?.loader === "fs-dev" ? undefined : "arm64",
120121
nodeVersion: "18",
121122
libc: "glibc",
122123
},

0 commit comments

Comments
 (0)