Skip to content

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

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

Closed
wants to merge 1 commit into from

Conversation

Lms24
Copy link
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
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 lforst and andreiborza May 10, 2024 07:44
@Lms24
Copy link
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