Skip to content

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.

@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.

3 participants