Skip to content

Support Node.js v12.0.0 in @assemblyscript/loader #2190

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

Merged
merged 1 commit into from
Apr 9, 2022

Conversation

jonahsnider
Copy link
Contributor

@jonahsnider jonahsnider commented Jan 20, 2022

Node.js v12.0.0 doesn't support conditional exports, so when it sees that main (index.js) is using ESM syntax it will throw a SyntaxError and prevent loading the module.

This PR sets main to use the UMD module so that old runtimes will be able to load the most compatible version. This will have no effect on ESM users since they can support conditional exports and will load exports.import (./index.js).

The earliest version of Node.js that can use this module in its current state is v12.20.0.

Verified

This commit was signed with the committer’s verified signature.
jonahsnider Jonah Snider
@jafri
Copy link
Contributor

jafri commented Apr 9, 2022

@dcodeIO would this alleviate some of the issues we discussed in discord last week?

@dcodeIO
Copy link
Member

dcodeIO commented Apr 9, 2022

I don't recall, but looks good to merge :)

@dcodeIO dcodeIO merged commit 33055b2 into AssemblyScript:main Apr 9, 2022
@jonahsnider jonahsnider deleted the patch-1 branch April 9, 2022 14:48
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

3 participants