ilearnio / module-alias

Register aliases of directories and custom module paths in Node
MIT License
1.76k stars 69 forks source link

module-alias in AWS Lambda #47

Closed MaxVynohradov closed 5 years ago

MaxVynohradov commented 5 years ago

Hi! Could module-alias be used in AWS Lambda environment?

Kehrlann commented 5 years ago

Hi hi ! I haven't tried it personally, but... If you package your node_modules in your function zip, and include modules-alias in there, I'm fairly confident it will work. Curious to have your feedback on this !

MaxVynohradov commented 5 years ago

@Kehrlann okay, thanks. I will try by myself later, and add comment here.

Kehrlann commented 5 years ago

I can confirm it does work. Proof of concept repo : https://github.com/Kehrlann/module-alias-aws-lambda