opencode icon indicating copy to clipboard operation
opencode copied to clipboard

fix: Fix worker.ts path for production and dev

Open veracioux opened this issue 2 months ago • 4 comments

veracioux avatar Oct 31 '25 23:10 veracioux

this needs to be tested by running ./script/build.ts --single and verifying it doesn't break anything

thdxr avatar Nov 01 '25 15:11 thdxr

Thanks for checking, I saw this one yesterday and it should fix the issue https://github.com/sst/opencode/pull/3778

kommander avatar Nov 04 '25 08:11 kommander

There are a few PRs trying to address this. The problem with my fix here is that when you build using build.ts, the built executable sees NODE_ENV=development for some reason. I converted it to a draft because I wanted to find out how to make it NODE_ENV=production in the production version. I'm currently busy with the tests, so someone else can tackle this if they want to.

veracioux avatar Nov 04 '25 08:11 veracioux

Thanks for checking, I saw this one yesterday and it should fix the issue #3778

It's a way better fix. But you should really mention that you are trying to work around a bun bug: https://github.com/oven-sh/bun/issues/15981 and that, at some point, it will be not needed anymore and rely on a bun version check.

jerome-benoit avatar Nov 04 '25 08:11 jerome-benoit