You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
adding support for .cjs file extensions for user function
Within ES modules (type is module inside package.json), if you try
to either:
```
require('file')
require('file.js')
```
it does not allow that as imports should be used within ES modules.
The only way to use require() is to explicitly require `.cjs` file
which explicitly insidicates that path is a CommonJS file, not ESM:
```
require('file.cjs')
```
This change allows to require .cjs files when a user function is being
searched. I would imagine eventually this library would need to fully
support ES modules as per
aws#44
however this diff will allow people to use lambdas within ES modules
if they have .cjs lambda files.
0 commit comments