My NestJS application compiles my Typescript worker
async function bootstrap(job: Job, done: DoneCallback) {
//...
}
export default bootstrap;
into a js file with following line:
exports["default"] = bootstrap;
But Bull.js is throwing the following error:
/usr/src/app/node_modules/bull/lib/job.js:516
reject(new Error(failedReason));
^
Error: origProcessor.apply is not a function
It only works if I manually add into the compiled js file:
module.exports = bootstrap;
Does anyone know how to properly config webpack to get it? I'd like to keep using webpack since all projects are using it.
Additional info:
- bull version: 4.10.4;
- webpack version: 5.76.3;
- nestjs version: 9.3.12;