-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix(aws-serverless): Add awslambda-auto
to package.json
exports
#12021
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
packages/aws-serverless/package.json
Outdated
"./awslambda-auto": { | ||
"import": { | ||
"default": "./build/npm/cjs/awslambda-auto.js" | ||
} | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import
is used for ESM but the file is CJS. I don't think this will work (or is necessary) and we can remove this block
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks - copy paste error :D
I added this block, as this is a cleaner way to declare the import (without the dist
). I left dist
for compatibility reasons.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
size-limit report 📦
|
In v7, the exports were not explicitly defined. In v8, the
awslambda-auto
export has to be added to the list of exports (done in this PR). Also added a variant without thedist
, so it can be added to theNODE_OPTIONS
as-r @sentry/aws-serverless/awslambda-auto
fixes #12012