fabiospampinato / worktank

A simple isomorphic library for executing functions inside WebWorkers or Node Threads pools.
MIT License
38 stars 2 forks source link

vite/esbuild plugin fail to export method #1

Open subframe7536 opened 1 year ago

subframe7536 commented 1 year ago

if function xxx() be the last function in file, it cannot properly export, otherwise, everything works

reproduce: https://stackblitz.com/edit/solidjs-templates-qvpheq?file=src%2Findex.worker.ts, see the comment on sum and the error info in console

fabiospampinato commented 7 months ago

Somehow I missed this issue, sorry about that. It seems a pretty weird issue, probably a bug in the esbuild transform somewhere 🤔