3.0.0-alpha.8 - extension addition causes failure in presence of exports
in package.json
#8420
Closed
7 tasks done
Labels
Milestone
Describe the bug
Vite adds an extension for deep imports:
https://github.com/vitejs/vite/pull/8348/files#diff-9b81bb364c02eab9494a7d27a5effc400cacbffd3b8f349c192f890c37bfc83fR639
vite-plugin-svelte
resolvessvelte
assvelte/ssr
whenssr: true
:https://github.com/sveltejs/vite-plugin-svelte/blob/0ee99f8ff7a18e7754f7bba373f0dce5817a12a0/packages/vite-plugin-svelte/src/index.ts#L142
Vite sees that the resolved path does not equal the original path and then adds
.mjs
. This file is not exposed in theexports
and so it fails.We should probably skip adding an extension when
exports
is present.Reproduction
https://github.com/sveltejs/kit/tree/vite-3 - need to bump from
alpha.6
toalpha.8
and then runpnpm build
System Info
Used Package Manager
pnpm
Logs
Validations
The text was updated successfully, but these errors were encountered: