workerpool
workerpool copied to clipboard
Working with typescript causing an error: The worker script extension must be \".js\", \".mjs\", or \".cjs\". Received \".ts\"
var workerpool = require('workerpool') var pool = workerpool.pool(__dirname + '/../workers/bulk_operations.ts') //causing the error
I have installed this module as well: https://www.npmjs.com/package/@types/workerpool
Node version: v14.19.0 typescript: v4.4.3
Early response would be highly appreciated
You'll first need to create a bundle of your bulk_operations.ts file, and then load that bundle as worker.
See also #189
Thank you. Will try and let you know