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
Svelte has a package.json in each directory to support older versions of Node. On Node 12+ the exports map will be used. Even on newer versions of Node, Vite appears to be looking at the nested package.json rather than the exports map, which is incorrect. This only happens with the external config.
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.
benmccann
changed the title
Nested package.json used for resolving rather than exports field
SSR resolve always happens as require even when it's an importNov 17, 2022
Describe the bug
Svelte has a
package.json
in each directory to support older versions of Node. On Node 12+ theexports
map will be used. Even on newer versions of Node, Vite appears to be looking at the nestedpackage.json
rather than theexports
map, which is incorrect. This only happens with theexternal
config.Originally reported in sveltejs/vite-plugin-svelte#360
Reproduction
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: