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

Specify "type": "module" when deploying to nodejs-module #4092

Merged
merged 2 commits into from
Oct 8, 2024

Conversation

kawaemon
Copy link
Contributor

@kawaemon kawaemon commented Aug 25, 2024

WIP because this PR depends on #4091

When --target experimental-nodejs-module is specified, Either using .mjs extension or setting "type": "module" field on package.json is required to execute emitted javascript code using Node.js.

In this PR, I used "type": "module" approach because it makes lower impact on existing codebases since it doesn't change file name.

@kawaemon kawaemon changed the title Specify "type": "module" when deploying to nodejs-module Specify "type": "module" when deploying to nodejs-module Aug 25, 2024
@kawaemon kawaemon force-pushed the add-package-json-type-field branch 4 times, most recently from 79ffb04 to 5d97240 Compare September 1, 2024 14:27
@kawaemon kawaemon marked this pull request as ready for review September 1, 2024 14:28
@kawaemon kawaemon force-pushed the add-package-json-type-field branch 2 times, most recently from 64bfbaa to 0228d7c Compare September 1, 2024 15:13
@daxpedda daxpedda added the needs review Needs a review by a maintainer. label Sep 7, 2024
@daxpedda daxpedda force-pushed the add-package-json-type-field branch from 0228d7c to efbcb09 Compare October 8, 2024 12:54
@daxpedda daxpedda force-pushed the add-package-json-type-field branch from efbcb09 to 83d6e77 Compare October 8, 2024 12:55
@kawaemon
Copy link
Contributor Author

kawaemon commented Oct 8, 2024

i'll merge upstream later today

@daxpedda daxpedda merged commit 2a0022a into rustwasm:main Oct 8, 2024
41 checks passed
@daxpedda
Copy link
Collaborator

daxpedda commented Oct 8, 2024

i'll merge upstream later today

All good, done already.
Thank you for the contribution!

@kawaemon
Copy link
Contributor Author

kawaemon commented Oct 8, 2024

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review Needs a review by a maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants