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

Add docs on how to use native ESM with Node.js #13793

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

julienp
Copy link
Contributor

@julienp julienp commented Jan 10, 2025

Provide official documentation on how to natively use ESM instead of compiling to CommonJS.

Provide official documentation on how to natively use ESM instead of compiling to CommonJS.
@julienp julienp marked this pull request as ready for review January 10, 2025 19:47
@julienp julienp requested a review from a team as a code owner January 10, 2025 19:47
@pulumi-bot
Copy link
Collaborator

Copy link
Contributor

@thoward thoward left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small change but otherwise LGTM! Thanks for the update @julienp .

npm install ts-node@^10
```

Lastly, you need to instruct Pulumi to use the ts-node/ESM loader by setting the `nodeargs` option in the [`runtime`](https://www.pulumi.com/docs/iac/concepts/projects/project-file/#runtime-options) options in `Pulumi.yaml`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"ts-node" -> "ts-node" (use code formatting)

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