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

Fix: Default condition should be last one #1722

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

roseckyj
Copy link
Contributor

In newer versions of Node.js, the module resolution fails as Node expects the default condition to be the last one:

Module not found: Error: Default condition should be last one

As discussed here this simple switch should fix the import

@ggrossetie
Copy link
Member

Thanks! Do you have an official documentation about this change?

@ggrossetie
Copy link
Member

Found it: https://nodejs.org/api/packages.html#conditional-exports

"default" - the generic fallback that always matches. Can be a CommonJS or ES module file. This condition should always come last.

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.

2 participants