Skip to content

fix(api): restore wrangler.toml main path relative to config file#16

Merged
ofcskn merged 1 commit into
mainfrom
development
May 19, 2026
Merged

fix(api): restore wrangler.toml main path relative to config file#16
ofcskn merged 1 commit into
mainfrom
development

Conversation

@ofcskn

@ofcskn ofcskn commented May 19, 2026

Copy link
Copy Markdown
Owner

When --config apps/api/wrangler.toml is passed, wrangler resolves all paths in the toml relative to the config file's directory (apps/api/). So main must be ../../dist/apps/api/worker.js, not dist/apps/api/worker.js.

Also remove [env.production] and [env.preview] blocks — they caused a "multiple environments" warning and risked deploying to the wrong env when no --env flag is passed.

When --config apps/api/wrangler.toml is passed, wrangler resolves all
paths in the toml relative to the config file's directory (apps/api/).
So main must be ../../dist/apps/api/worker.js, not dist/apps/api/worker.js.

Also remove [env.production] and [env.preview] blocks — they caused a
"multiple environments" warning and risked deploying to the wrong env
when no --env flag is passed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ofcskn ofcskn merged commit 3e0a194 into main May 19, 2026
1 of 3 checks passed
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.

1 participant