Forked from deltaepsilon/how-to-firebase-8-require-inside-function.js
Created
June 26, 2018 12:53
-
-
Save byteshiva/b5ccadeaa34f5ec8e2dc1fd108d1e08b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Good | |
exports.sendEmail = functions.auth.user().onCreate(event => { | |
const mailgun = require('mailgun-js'); | |
// ... | |
}); | |
// Not As Awesome | |
const mailgun = require('mailgun-js'); | |
exports.sendEmail = functions.auth.user().onCreate(event => { | |
// ... | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment