Using Web Workers for the browser is handled by the official worker-loader Webpack module.
Unfortunately worker-loader does not handle Node.js Worker threads.
I'm using Webpack to bundle an AWS Lambda function running on Node.js. And I want to use Node.js Worker threads that requires having dedicated files for each worker implementation.
So what is the best way to handle Node.js Worker threads within a Webpack bundle?
Note: This is a question about handling Node.js workers server side (not in browser).
Edit: Webpack handles Worker threads but need to switch from CommonJS to ESM https://github.com/webpack/webpack/issues/15961