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

Enable ES Module usage #89

Closed
wants to merge 1 commit into from
Closed

Enable ES Module usage #89

wants to merge 1 commit into from

Conversation

benschwarz
Copy link

@benschwarz benschwarz commented Apr 13, 2022

As noted in #80, es module imports are currently broken on the 2.1.0 release.

According to the node docs, the package.json module field is ignored. Instead, an ES module can be signified using "type": "module".

In this PR:

  • Bump to 2.1.1
  • Add "type": "module"

@benschwarz
Copy link
Author

benschwarz commented Apr 13, 2022

@jhurliman It looks like we'll need a similar change to just-performance too. Did you want me to go ahead and update that as well?

@nigelis
Copy link

nigelis commented Apr 19, 2022

@benschwarz
Adding "type": "module" makes this module not importable by other commonjs modules, as I tested locally.

The change to remove "type": "module" is introduced in #79 .
I think the real problem is that the module is not built properly to support esm and cjs at the same time.

@benschwarz benschwarz closed this Apr 20, 2022
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.

2 participants