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): Add exports field to package.json #10569

Merged
merged 2 commits into from
Feb 9, 2024

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Feb 8, 2024

This PR adds an exports field to the package.json for @sentry/angular-ivy. While it seems like regular Angular apps didn't need it, tools like vitest expect the field as soon as type: "module" is specified.

IMO this is just a fix for v7 as we'll bump the APF from Angular 12 to at least Angular 14 in v8. So once this is in, I'll also backport the fix to v7.

In addition to the repro provided in #10511, I also tested with Angular 12 and Angular 17 test apps. Seemed to work so far.

closes #10511

Copy link
Contributor

github-actions bot commented Feb 8, 2024

size-limit report 📦

Path Size
@sentry/browser (incl. Tracing, Replay, Feedback) - Webpack (gzipped) 78.34 KB (+0.02% 🔺)
@sentry/browser (incl. Tracing, Replay) - Webpack (gzipped) 69.55 KB (-0.02% 🔽)
@sentry/browser (incl. Tracing, Replay with Canvas) - Webpack (gzipped) 73.5 KB (+0.01% 🔺)
@sentry/browser (incl. Tracing, Replay) - Webpack with treeshaking flags (gzipped) 63.19 KB (+0.02% 🔺)
@sentry/browser (incl. Tracing) - Webpack (gzipped) 33.54 KB (+0.05% 🔺)
@sentry/browser (incl. browserTracingIntegration) - Webpack (gzipped) 33.4 KB (+0.06% 🔺)
@sentry/browser (incl. Feedback) - Webpack (gzipped) 31.39 KB (+0.07% 🔺)
@sentry/browser (incl. sendFeedback) - Webpack (gzipped) 31.39 KB (+0.07% 🔺)
@sentry/browser - Webpack (gzipped) 22.65 KB (+0.07% 🔺)
@sentry/browser (incl. Tracing, Replay, Feedback) - ES6 CDN Bundle (gzipped) 76.37 KB (+0.02% 🔺)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped) 67.9 KB (0%)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped) 33.67 KB (+0.03% 🔺)
@sentry/browser - ES6 CDN Bundle (gzipped) 24.74 KB (+0.02% 🔺)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed) 214.09 KB (+0.01% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed) 101.89 KB (+0.02% 🔺)
@sentry/browser - ES6 CDN Bundle (minified & uncompressed) 74.27 KB (+0.02% 🔺)
@sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped) 36.82 KB (+0.06% 🔺)
@sentry/react (incl. Tracing, Replay) - Webpack (gzipped) 69.95 KB (+0.03% 🔺)
@sentry/react - Webpack (gzipped) 22.68 KB (+0.05% 🔺)
@sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped) 87.55 KB (-0.01% 🔽)
@sentry/nextjs Client - Webpack (gzipped) 51.73 KB (+0.03% 🔺)
@sentry-internal/feedback - Webpack (gzipped) 17.23 KB (+0.08% 🔺)

@Lms24 Lms24 requested review from lforst and AbhiPrasad February 8, 2024 09:57
Co-authored-by: Andrei Alecu <aandrei03@gmail.com>
@Lms24 Lms24 merged commit b220be5 into develop Feb 9, 2024
53 checks passed
@Lms24 Lms24 deleted the lms/fix-angular-ivy-exports-field branch February 9, 2024 15:26
Lms24 added a commit that referenced this pull request Feb 12, 2024
Add an `exports` field to the `package.json` for
`@sentry/angular-ivy`. While it seems like regular Angular apps didn't
need it, tools like `vitest` expect the field as soon as `type:
"module"` is specified.

---

Co-authored-by: Andrei Alecu <aandrei03@gmail.com>
Lms24 added a commit that referenced this pull request Feb 12, 2024
Add an `exports` field to the `package.json` for
`@sentry/angular-ivy`. While it seems like regular Angular apps didn't
need it, tools like `vitest` expect the field as soon as `type:
"module"` is specified.

---

Co-authored-by: Andrei Alecu <aandrei03@gmail.com>
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.

[vitest] require() of ES Module @angular/core/fesm2022/core.mjs not supported #9376
3 participants