Describe the bug
here these fields are evaluated before the mainFields loop below. Leading to mainFields being ignored if they would be sorted in front of "browser".
vite-plugin-svelte sets a custom "mainFields" list with "svelte" as the first entry to resolve svelte components directly, which should take precedence over both "browser" and "module".
Reproduction
https://github.com/benoitf/svelte-issue-app
Steps to reproduce
see sveltejs/vite-plugin-svelte#813 too
[email protected] does not include "browser" in mainfields,
[email protected] added it.
System Info
Used Package Manager
yarn
Logs
No response
Validations