How to handle Node.js Worker threads in Webpack?

Viewed 960

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).

0 Answers
Related