josdejong / workerpool

Offload tasks to a pool of workers on node.js and in the browser
Apache License 2.0
2.06k stars 147 forks source link

demo run throw Error: Cannot find module '...\out\main\worker.js' after vite build #459

Closed whaleluo closed 2 weeks ago

whaleluo commented 1 month ago
 const pool = workerpool.pool();
  pool.exec(fibonacci,[100]).then(res=>{
      console.log('result:',res)
  }).catch(error => {
      console.log('result:',error)
  })

I found worker.js at npm_modules/worker_pool/dist , so vite that source code not use ' work.js' , that no bundle it

josdejong commented 4 weeks ago

Thanks for reporting. How can I reproduce your issue exactly? Can you create a minimal demo?

josdejong commented 2 weeks ago

Closing due to a lack of response. Please reopen if this is still an issue.