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

ref: Use esm imports with localforage and add esModuleInterop #3403

Merged
merged 1 commit into from
Apr 16, 2021

Conversation

kamilogorek
Copy link
Contributor

Fixes #3101
Fixes #3401
Closes #3294

esModuleInterop is recommended by TS Team - https://www.typescriptlang.org/tsconfig#esModuleInterop and we already use it in other packages.

@github-actions
Copy link
Contributor

size-limit report

Path Size
@sentry/browser - CDN Bundle (gzipped) 20.59 KB (+0.01% 🔺)
@sentry/browser - Webpack 21.45 KB (0%)
@sentry/react - Webpack 21.49 KB (0%)
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 27.8 KB (+0.01% 🔺)

Copy link
Contributor

@iker-barriocanal iker-barriocanal left a comment

Choose a reason for hiding this comment

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

Enabling esModuleInterop will also enable allowSyntheticDefaultImports.

from https://www.typescriptlang.org/tsconfig#esModuleInterop.

#3180 will this break?

@kamilogorek
Copy link
Contributor Author

We are not adding any @ts-ignore this time and are using typeof for a specific constructor type, so I hope this will work correctly across all bundlers.

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/integrations uses CommonJS for localforage breaking ESM compatibility
2 participants