Skip to content

refactor(resolve): prefer exports condition over svelte field #747

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

Merged
merged 3 commits into from
Sep 15, 2023

Conversation

dominikg
Copy link
Member

@dominikg dominikg commented Sep 15, 2023

This is the second step in the migration to exports condition.

Previously, the svelte field took precedence, now it is only used as a fallback if vite is unable to resolve a library.

The warning log and faq have been updated to reflect that library authors need to add the exports condition to remain compatible with future majors.

fixes #725

@dominikg
Copy link
Member Author

@bluwy noticed that if we prefer exports condition, we can actually rely on vite resolving the svelte field via mainFields.

so we are able to get rid of the custom resolve logic completely. yay

Copy link
Member

@bluwy bluwy left a comment

Choose a reason for hiding this comment

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

🚢

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.

prefer svelte exports condition over svelte field for resolving libraries
2 participants