[PR #3764] fix: make Worker import cwd-independent (use import.meta.url) #10751

Closed
opened 2026-02-16 18:15:30 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/3764

State: closed
Merged: No


Allows to use relative worker path.

Allows to use dev version with different cwd, i.e. test against user own projects.
like excuting this in my project.

bun run --preload @opentui/solid/preload  {{OPENCODE_DIR}}/packages/opencode/src/index.ts
# or
cd opencode-repo
bun dev ~/my-own-repo

Original bun issue https://github.com/oven-sh/bun/issues/15981

Bun doc has example of using worker with URL (href is not needed)
https://bun.com/docs/runtime/workers#%22open%22

Closes #3220

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/3764 **State:** closed **Merged:** No --- Allows to use relative worker path. Allows to use dev version with different cwd, i.e. test against user own projects. like excuting this in my project. ```shell bun run --preload @opentui/solid/preload {{OPENCODE_DIR}}/packages/opencode/src/index.ts # or cd opencode-repo bun dev ~/my-own-repo ``` Original bun issue https://github.com/oven-sh/bun/issues/15981 Bun doc has example of using worker with URL (href is not needed) https://bun.com/docs/runtime/workers#%22open%22 Closes #3220
yindo added the pull-request label 2026-02-16 18:15:30 -05:00
yindo closed this issue 2026-02-16 18:15:30 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#10751