serverless-runtime-babel
serverless-runtime-babel copied to clipboard
Adds callback parameter to ENV loader
Adds a "cb" parameter to the ENV var pre load handler, allowing callbacks to be used: e.g. of the form handler (event, context, cb) => {}
.
Had a function looking something like this:
module.exports.handler = (event, context, cb) => {
console.log(event, context, cb)
return cb(null, 'Success!');
};
Serverless was returning the error
cb is not a function
Since it was always undefined. I didn't have the ability to pass a callback through the babel transpiled code, so this change adds that functionality.