Separate processor with ES module syntax not working
Created by: ddavid67
Description
Currently you can't use a processor coded with ES module syntax (export keyword) It works by importing the job into index.mjs, but I want to separate processes.
Test code to reproduce
index.mjs
let queue = new Queue('queue');
queue.process('/processor.mjs');
processor.mjs
export default async (job) => {
return 'job completed;
}
result
internal/modules/cjs/loader.js:712
throw new ERR_REQUIRE_ESM(filename);
^
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /processor.mjs
Bull version
v3.4.1