lib/utils/getServerlessConfigFile.js/handleJsConfigFile
const handleJsConfigFile = (jsConfigFile) => BbPromise.try(() => {
  // use require to load serverless.js
  // eslint-disable-next-line global-require
  const configExport = require(jsConfigFile);
  // In case of a promise result, first resolve it.
  return configExport;
}).then(config => {
  if (_.isPlainObject(config)) {
    return config;
  }
  throw new Error('serverless.js must export plain object');
});