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

Use native require.resolve when available #52

Merged
merged 1 commit into from Jan 6, 2021

Conversation

nicolo-ribaudo
Copy link
Member

@nicolo-ribaudo nicolo-ribaudo commented Jan 3, 2021

This is the same as babel/babel#12439.
TL;DR we can use the native require.resolve in Node.js >= 8, and it's important to do so because Next.js breaks the resolve package.

I think a custom plugin was overkill here, so I just modified the code to use the native require.resolve when it supports the paths option.

Ref: babel/babel#12583 (comment)

@nicolo-ribaudo nicolo-ribaudo merged commit 460f400 into babel:main Jan 6, 2021
@nicolo-ribaudo nicolo-ribaudo deleted the require-resolve branch January 6, 2021 13:08
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.

None yet

2 participants