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

add manual support for ESM in NodeJS #55

Conversation

thescientist13
Copy link
Contributor

@thescientist13 thescientist13 commented Dec 20, 2021

resolves #48

  1. Override module field in package.json to point to a non empty file (dist/websocialshare/websocialshare.esm.js)
  2. Update README with docs for NodeJS / ESM support

Question:
Although these fields are all community driven / not NodeJS "speced", wondering what do about them in package.json, since they were also all pointing at the same empty file?

  • "es2015"
  • "es2017"
  • "jsnext:main"

Ultimately it's up to tooling authors to support them, but from my experience, I think I've only really seen module catch on so far, otherwise I think export maps are the way to go (and so hopefully Stencil will support this too 🤞 )

@peterpeterparker peterpeterparker merged commit 1482df7 into peterpeterparker:main Dec 21, 2021
@peterpeterparker
Copy link
Owner

Awesome, thanks for the PR 👍

@thescientist13 thescientist13 deleted the bug/issue-48-shim-ESM-and-nodejs-support branch December 21, 2021 16:23
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.

ESM entry points in package.json resolve to an empty file
2 participants