Skip to content

fix: add directory to wrangler assets config for static export#221

Open
arifpro wants to merge 1 commit intocloudflare:mainfrom
arifpro:fix/219-wrangler-assets-directory
Open

fix: add directory to wrangler assets config for static export#221
arifpro wants to merge 1 commit intocloudflare:mainfrom
arifpro:fix/219-wrangler-assets-directory

Conversation

@arifpro
Copy link

@arifpro arifpro commented Mar 2, 2026

When using output: 'export' in next.config.ts, wrangler 4.69.0 requires
the assets config to include a directory property. This fix:

  • Detects output mode from next.config during deploy
  • Adds directory: 'export' to wrangler assets config for static export
  • Skips images binding for static export (not needed since images are
    pre-optimized at build time)

Fixes #219

When using output: 'export' in next.config.ts, wrangler 4.69.0 requires
the assets config to include a directory property. This fix:

- Detects output mode from next.config during deploy
- Adds directory: 'export' to wrangler assets config for static export
- Skips images binding for static export (not needed since images are
  pre-optimized at build time)

Fixes cloudflare#219
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vinext deploy fails with wrangler error: assets config missing required directory property when using output: "export" in next.config.ts

1 participant