Skip to content

fix(aws-serverless): Remove invalid esm/import entry point in package.json#11968

Closed
Lms24 wants to merge 1 commit intodevelopfrom
lms/fix-aws-serverless-esm-entrypoint
Closed

fix(aws-serverless): Remove invalid esm/import entry point in package.json#11968
Lms24 wants to merge 1 commit intodevelopfrom
lms/fix-aws-serverless-esm-entrypoint

Conversation

@Lms24
Copy link
Copy Markdown
Member

@Lms24 Lms24 commented May 10, 2024

Looks like we intentionally removed the esm artifacts in our @sentry/aws-serverless package but still referenced them via the import entry point in the package.json. This PR removes the import entry for now until we have proper ESM support in the serverless package.

Full disclaimer: I'm not sure if this is the right way to go but the alternative (see comment below) feels wrong, too.

closes #11965

Comment on lines -24 to -27
"import": {
"types": "./build/npm/types/index.d.ts",
"default": "./build/npm/esm/index.js"
},
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The alternative I guess would be to point to

"default": "./build/npm/cjs/index.js"

instead but I have no idea if this is better or would cause other issues 🤔 My gut feeling says issues because Node probably expects ESM when it resolves an import entry point (?)

@Lms24 Lms24 requested review from andreiborza and lforst May 10, 2024 07:44
@Lms24
Copy link
Copy Markdown
Member Author

Lms24 commented May 10, 2024

Nevermind, I was wrong, we actually support ESM now. Closing and opening another PR soon

@Lms24 Lms24 closed this May 10, 2024
@Lms24 Lms24 deleted the lms/fix-aws-serverless-esm-entrypoint branch May 10, 2024 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@sentry/aws-serverless Has No ESM Artifacts

1 participant