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 import of hoist-non-react-statics #2755

Merged
merged 3 commits into from Jul 21, 2020
Merged

Fix import of hoist-non-react-statics #2755

merged 3 commits into from Jul 21, 2020

Conversation

timdorr
Copy link
Contributor

@timdorr timdorr commented Jul 20, 2020

The module uses a default export, so the star import is technically incorrect form: https://github.com/mridgway/hoist-non-react-statics/blob/f3de655212b47f20b9c6a27e89a60d23f358925a/src/index.js#L91

As a side effect, this causes build errors with Rollup: (!) Cannot call a namespace ('hoistNonReactStatic')

I think esModuleInterop is needed as well, but I'm going to see if CI passes without that first, as it might just be my local setup that's the issue.

The module uses a default export, so the star import is technically incorrect form: https://github.com/mridgway/hoist-non-react-statics/blob/f3de655212b47f20b9c6a27e89a60d23f358925a/src/index.js#L91

As a side effect, this causes build errors with Rollup: `(!) Cannot call a namespace ('hoistNonReactStatic')`
hoist-non-react-statics causes this issue, as it's built as a CommonJS module. This lets the default import function correctly on the transpiled build output in the npm module.
@timdorr
Copy link
Contributor Author

timdorr commented Jul 20, 2020

Ugh, looks like this is going to depend on #2756. If that can get merged in, I'll rebase this PR. Sorry about the hassle!

@kamilogorek kamilogorek merged commit fc0af9e into getsentry:master Jul 21, 2020
@kamilogorek
Copy link
Contributor

Thanks! I'll make sure everything is green before doing release

@timdorr timdorr deleted the import-fix branch July 21, 2020 13: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.

None yet

2 participants