Skip to content

Investigate switching all of AS to ESM #1306

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

Closed
dcodeIO opened this issue May 28, 2020 · 3 comments · Fixed by #2157
Closed

Investigate switching all of AS to ESM #1306

dcodeIO opened this issue May 28, 2020 · 3 comments · Fixed by #2157

Comments

@dcodeIO
Copy link
Member

dcodeIO commented May 28, 2020

While the CommonJS and ESM compatibility story in node appears to be a disaster still, ESM is getting more and more traction and since AS requires relatively modern environments anyway, we should aim at making the switch rather sooner than later.

Related issues: #1207

@ghost
Copy link

ghost commented Feb 14, 2021

At the moment, this is still a very relevant question!
Deno supports TypeScript out of the box and a simpler and more concise solution for working with Web Assembly!
Is it possible to have two versions of AS, one for Node.js, and another for Deno?
where can I keep up-to-date information on this issue?

@vjpr
Copy link

vjpr commented Oct 5, 2021

npx asinit . generates a commonjs Node package.

What is the status of Node.js ESM support? I expect there would need to be an --experimental-loader=xxx shim. Has this been done?


EDIT: ESM seems to work fine, it's just like using a napi addon, just the scaffolder needs updating, or maybe there is an existing flag I missed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants