Skip to content
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

fix(angular-ivy): Adjust package entry points to support Angular 17 with SSR config #9412

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Oct 30, 2023

This PR adjusts the entry points of @sentry/angular-ivy's package.json to point directly to FESM2015 bundles (= bundled ESM2015 code) instead of the UMD bundles. This fixes an error when the old (no longer supported) UMD bundles were picked up by Vite in Angular apps with SSR config (#9376).

This workaround was suggested by an Angular Team member and after experimenting with it, I found out that in addition to removing the main entry point, we also need to add "type": "module".

Tested this with Angular 17 + Node 18 as well as Angular 12 with Node 12. Both seem to work in my test apps. I'm not 100% confident that this always works because we're no longer APF12-compliant. However we'll go with this for now and revisit if we get reports.

A proper long term fix to this is to bump to Angular 15 in this package which we can only do in a new major.

closes #9376

@Lms24 Lms24 requested review from mydea and AbhiPrasad October 30, 2023 15:25
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.

require() of ES Module @angular/core/fesm2022/core.mjs not supported
2 participants