@@ -187,6 +187,7 @@ for (const item of targets) {
187187 const rootPath = path . resolve ( dir , "../../node_modules/@opentui/core/parser.worker.js" )
188188 const parserWorker = fs . realpathSync ( fs . existsSync ( localPath ) ? localPath : rootPath )
189189 const workerPath = "./src/cli/cmd/tui/worker.ts"
190+ const rgPath = "./src/file/ripgrep.worker.ts"
190191
191192 // Use platform-specific bunfs root path based on target OS
192193 const bunfsRoot = item . os === "win32" ? "B:/~BUN/root/" : "/$bunfs/root/"
@@ -197,6 +198,9 @@ for (const item of targets) {
197198 tsconfig : "./tsconfig.json" ,
198199 plugins : [ plugin ] ,
199200 external : [ "node-gyp" ] ,
201+ format : "esm" ,
202+ minify : true ,
203+ splitting : true ,
200204 compile : {
201205 autoloadBunfig : false ,
202206 autoloadDotenv : false ,
@@ -210,12 +214,19 @@ for (const item of targets) {
210214 files : {
211215 ...( embeddedFileMap ? { "opencode-web-ui.gen.ts" : embeddedFileMap } : { } ) ,
212216 } ,
213- entrypoints : [ "./src/index.ts" , parserWorker , workerPath , ...( embeddedFileMap ? [ "opencode-web-ui.gen.ts" ] : [ ] ) ] ,
217+ entrypoints : [
218+ "./src/index.ts" ,
219+ parserWorker ,
220+ workerPath ,
221+ rgPath ,
222+ ...( embeddedFileMap ? [ "opencode-web-ui.gen.ts" ] : [ ] ) ,
223+ ] ,
214224 define : {
215225 OPENCODE_VERSION : `'${ Script . version } '` ,
216226 OPENCODE_MIGRATIONS : JSON . stringify ( migrations ) ,
217227 OTUI_TREE_SITTER_WORKER_PATH : bunfsRoot + workerRelativePath ,
218228 OPENCODE_WORKER_PATH : workerPath ,
229+ OPENCODE_RIPGREP_WORKER_PATH : rgPath ,
219230 OPENCODE_CHANNEL : `'${ Script . channel } '` ,
220231 OPENCODE_LIBC : item . os === "linux" ? `'${ item . abi ?? "glibc" } '` : "" ,
221232 } ,
0 commit comments