Skip to content

Commit

Permalink
feat: support next/image with static exports
Browse files Browse the repository at this point in the history
  • Loading branch information
pieh committed Jul 30, 2024
1 parent 3f490f6 commit 8ec0424
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ export const onBuild = async (options: NetlifyPluginOptions) => {
await saveBuildCache(ctx)
}

// static exports only need to be uploaded to the CDN
// static exports only need to be uploaded to the CDN and setup /_next/image handler
if (ctx.buildConfig.output === 'export') {
return copyStaticExport(ctx)
return Promise.all([copyStaticExport(ctx), setImageConfig(ctx)])
}

await verifyAdvancedAPIRoutes(ctx)
Expand Down

0 comments on commit 8ec0424

Please sign in to comment.