You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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".
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
i'll be working on a PR to fix this, moving the code that sits outside the loop into a utility function and calling it inside the loop when the browser condition is being checked (instead of the current continue).
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
The text was updated successfully, but these errors were encountered: