Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function getHandlerFilePath(servicePath, handler) {
function resolveToBaseModuleGlob(file) {
const relative = path.relative(process.cwd(), file);
const match = relative.match(/^((\.\.\/)*node_modules\/\S+?\/)/);
if (match) {
if (match && !match[1].endsWith('aws-sdk')) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will still miss aws-sdk imports where the library is imported modularly eg: aws-sdk/clients/s3. Would it be possible for you to add a test to confirm that this works?
If you don't have time I am happy to merge this as is, as it does move us closer to resolving that issue.

return `${match[1]}**`;
}
return relative;
Expand Down