standard-things / esm

Tomorrow's ECMAScript modules today!
Other
5.27k stars 147 forks source link

How can I use this with Azure Functions v2? (serverless functions) #869

Open GalGreenfield opened 4 years ago

GalGreenfield commented 4 years ago

How can I use this with Azure Functions version 2? v2 supports Node v8 and Node v10 only. Their file structure is the following (from the documentation):

FunctionsProject
 | - MyFirstFunction
 | | - index.js
 | | - function.json
 | - MySecondFunction
 | | - index.js
 | | - function.json
 | - SharedCode
 | | - myFirstHelperFunction.js
 | | - mySecondHelperFunction.js
 | - node_modules
 | - host.json
 | - package.json
 | - extensions.csproj

so there's no single entry point and there's no app - just serveless functions. I want to use esm to export code from SharedCode/myFirstHelperFunction.js, and import it in MyFirstFunction/index.js. How can I do that?

xlanex6 commented 4 years ago

@GalGreenfield If you find solution , can you share it ?

thanks

GalGreenfield commented 4 years ago

@GalGreenfield If you find solution , can you share it ?

thanks

I wasn't able to, but I barely spent any time trying to find a solution.