-
Notifications
You must be signed in to change notification settings - Fork 171
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 node 16 cjs import #2112
Fix node 16 cjs import #2112
Conversation
"import": { | ||
"types": "./dist/index.d.ts", | ||
"default": "./dist/index.mjs" | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
diff is noisier than ideal as I ran https://www.npmjs.com/package/fixpack on the package.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I guess? 😄 If it passes the checks then it passes them, I assume it was missing the ability to be imported via require? Also, do we need to do this for react hooks as well?
"types": "./dist/index.d.ts", | ||
"default": "./dist/index.mjs" | ||
}, | ||
"require": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm assuming this was the main thing that was missing for node CJS imports (?)
Strangely... no? Wait... I thought I'd checked it too but apparently not as yeah, it does have the same issue — https://arethetypeswrong.github.io/?p=%40electric-sql%2Freact%400.6.1 I'll update it as well in a little while. |
✅ Deploy Preview for electric-next ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for electric-next ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Fixes #2107
From running
npm pack
locally on PR:The change is making exports explicit for esm or cjs:
And generating separate type declarations.