Resolves #21855 Ended up using workerize in order to setup the worker once it allows easy imports (for babel's parse function) and exports.
Resolves #21855 Ended up using workerize in order to setup the worker once it allows easy imports (for babel's parse function) and exports.