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(storage-rn): Fix interop imports for CommonJS and update React imports #3251

Merged
merged 5 commits into from
Jun 6, 2023

Conversation

kitten
Copy link
Member

@kitten kitten commented Jun 6, 2023

Resolves #3250

Summary

This updates the interop setting in Rollup to correctly identify default imports again when transpiled to commonjs by switching it to auto, and allowing it to add a check for __esModule to the require statement of @urql/storage-rn’s imports specifically in CommonJS.

This PR also updates all React imports to use namespace imports in ESM .es.js output and to assume defaultOnly for interop.

Set of changes

  • Update React imports to import * as React from 'react' namespace imports
  • Update interop setting in Rollup to auto, except for React

@kitten kitten merged commit ba5ffe7 into main Jun 6, 2023
@kitten kitten deleted the fix/interop-cjs branch June 6, 2023 16:47
@github-actions github-actions bot mentioned this pull request Jun 6, 2023
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.

storage-rn: Incorrect interop require expressions in CJS
1 participant