Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix(cli-utils): Add moduleResolution override for NodeNext/Node16 #356

Merged
merged 2 commits into from
Jul 30, 2024

Conversation

kitten
Copy link
Member

@kitten kitten commented Jul 30, 2024

Related: #347 (comment)

Summary

Using NodeNext/Node16 is almost always a mistake. This will disallow extension-less imports, and is almost always not preferred over Bundler. In practice, NodeNext is only the Bundler resolution with the added restriction, and if it's used and we get module resolution errors, this was likely a mistake. Overriding it is always safe since it's a super-set of NodeNext.

Set of changes

  • Override moduleResolution to Bundler if it's NodeNext/Node16

@kitten kitten requested a review from JoviDeCroock July 30, 2024 16:33
Copy link

changeset-bot bot commented Jul 30, 2024

🦋 Changeset detected

Latest commit: 30e18c6

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

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

@kitten kitten changed the title fix(cli-utils): Add default moduleResolution override when NodeNext is set fix(cli-utils): Add moduleResolution override for NodeNext/Node16 Jul 30, 2024
@kitten kitten merged commit e7d4d4b into main Jul 30, 2024
2 checks passed
@kitten kitten deleted the fix/default-options branch July 30, 2024 16:56
@github-actions github-actions bot mentioned this pull request Jul 30, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants