liuli-tools icon indicating copy to clipboard operation
liuli-tools copied to clipboard

Node Worker Support

Open jarrodpayne opened this issue 1 year ago • 3 comments

I don’t see any mention on node’s worker_threads support. Is there any support planned?

jarrodpayne avatar Aug 08 '24 18:08 jarrodpayne

Waiting for upstream vite implementation, check https://github.com/vitejs/vite/pull/3932

rxliuli avatar Aug 08 '24 18:08 rxliuli

Waiting for upstream vite implementation, check vitejs/vite#3932

Thanks for referencing https://github.com/vitejs/vite/pull/3932. It doesn't appear there is likely to be movement on that PR for a few reasons:

  1. it's from 2021 - no new commits since 2021
  2. nice-to-have label

I see your comment here: https://github.com/vitejs/vite/pull/3932#issuecomment-1879969295 where you reference electron-vite's worker plugin.

I actually tried that worker plugin as well as electron-vite's modulePath plugin before arriving at your repo. As I'm not too familiar with vite plugin development, I was unable to get them working in serve mode, but they do work in build mode.

jarrodpayne avatar Aug 08 '24 20:08 jarrodpayne

I actually tried that worker plugin as well as electron-vite's modulePath plugin before arriving at your repo. As I'm not too familiar with vite plugin development, I was unable to get them working in serve mode, but they do work in build mode.

I'm not sure what you mean by 'serve' mode. Do you perhaps have a GitHub repo I could look at? I could try to quickly write a vite plugin to test it out. I've previously written a rollup plugin as well.

rxliuli avatar Aug 08 '24 20:08 rxliuli