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

Explicitly define exports for npm package, closes #134 #163

Closed
wants to merge 2 commits into from
Closed

Explicitly define exports for npm package, closes #134 #163

wants to merge 2 commits into from

Conversation

StudioSpindle
Copy link

@StudioSpindle StudioSpindle commented Nov 24, 2021

Tried it out in a local project and it works. But that's a specific implementation. Also, the tests are green.

Would be interested in any thoughts of a repository maintainer. More info in #134

remivledder added 2 commits November 24, 2021 14:07
Signed-off-by: remivledder <remi.vledder@powerhouse.nl>
Signed-off-by: remivledder <remi.vledder@powerhouse.nl>
@StudioSpindle
Copy link
Author

StudioSpindle commented Nov 24, 2021

Using the test script by @rbuckton in this comment:

Version (a) (b) (c) (d)
17.0.0 ESM CommonJS Warning ³, SyntaxError ¹ TypeError ²
15.4.0 ESM CommonJS Warning ³, SyntaxError ¹ TypeError ²
12.20.1 ESM CommonJS Warning ³, SyntaxError ¹ TypeError ²
12.18.3 ESM CommonJS SyntaxError ¹ TypeError ²
12.7.0* CommonJS CommonJS SyntaxError ¹ ok
12.7.0 Error [ERR_REQUIRE_ESM]

NOTES:
* with --experimental-modules ON
¹ SyntaxError Unexpected token export - Loader tried to load ESM module as CommonJS
² TypeError Unknown file extension ".json" - Loader won't load .json
³ Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.

@prescience-data
Copy link

Hopefully this works!
🙏🏻

@StudioSpindle
Copy link
Author

So... Is this library still maintained?

@georgebrindeiro
Copy link

@rbuckton @DanielRosenwasser @orta could you give us a hand getting this merged? Maybe point us in the right direction of who could/should review and approve it?

@rbuckton
Copy link
Member

rbuckton commented Feb 8, 2022

I merged #135, so this is no longer needed.

@rbuckton rbuckton closed this Feb 8, 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.

None yet

4 participants