Skip to content

Instantly share code, notes, and snippets.

@yamachu
Created July 28, 2020 12:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yamachu/da46b611b828a51aaa7c309b06e1d466 to your computer and use it in GitHub Desktop.
Save yamachu/da46b611b828a51aaa7c309b06e1d466 to your computer and use it in GitHub Desktop.
JavaScript + Webpack なファイルを Azure Functions で起動する時の function.json とwebpack.config.js の libraryTarget の対応
{
"entryPoint": "fooFunction"
}
// このファイルをrequireすると { fooFunction: Function } が返ってくる
export const fooFunction = (context) => {
context.log('Hello');
}
// このファイルをrequireするとfunctionが返ってくる
module.exports = (context) => {
context.log('Hello');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment