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

Update module and moduleResolution #1650

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

aurelius0523
Copy link
Contributor

@aurelius0523 aurelius0523 commented Sep 6, 2024

Overview

Attempting to address issue #1483.

Changes

  • Replaced --module CommonJs with --module Node16. Source
  • Replaced --module ES2015 with --module ES2022. While Node16 is recommended, it only works if type is set to module in package.json. Source

    Do not use for Node.js. Use node16 or nodenext with "type": "module" in package.json to emit ES modules for Node.js.

Additional thoughts

I have considered removing CommonJs entirely since it was mentioned a long time ago and the only place it is used here are in oss-npm-package and private-npm-package. I am not very well-versed in library conventions so I have left them as is but let me know if we should only emit esm only.

Also, not sure if this should be in a changeset 🤔

@aurelius0523 aurelius0523 requested a review from a team as a code owner September 6, 2024 13:29
Copy link

changeset-bot bot commented Sep 6, 2024

⚠️ No Changeset found

Latest commit: bfc9809

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@aurelius0523 aurelius0523 marked this pull request as draft September 6, 2024 13:58
@aurelius0523 aurelius0523 force-pushed the update-module-and-module-resolution branch 2 times, most recently from 5ff0737 to d0ec6bf Compare September 6, 2024 14:40
@aurelius0523 aurelius0523 force-pushed the update-module-and-module-resolution branch from d0ec6bf to a47ac48 Compare September 6, 2024 15:03
@aurelius0523 aurelius0523 force-pushed the update-module-and-module-resolution branch from 1c3a4ee to bfc9809 Compare September 6, 2024 15:06
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.

1 participant