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

v2.55.0 may break named imports #440

Open
dan-serendipity opened this issue Aug 8, 2024 · 1 comment
Open

v2.55.0 may break named imports #440

dan-serendipity opened this issue Aug 8, 2024 · 1 comment

Comments

@dan-serendipity
Copy link

Prior to v2.55.0, statements like import { init } from 'mixpanel-browser' were possible.
The most recent type definitions at @types/mixpanel-browser support this.
However, after upgrading to v2.55.0, if your bundler decides to start using mixpanel.module.js, you will get a runtime error: Uncaught SyntaxError: The requested module does not provide an export named 'init'.
The new esm module has the following export statement only export { mixpanel as default };

@tdumitrescu
Copy link
Member

Hmm I'm not sure how importing init worked before, but that was never a documented or supported usage. We don't control the 3rd-party type definitions. The public API has always been that you import the mixpanel object.

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

No branches or pull requests

2 participants