8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 08c1452 commit 30a41ffCopy full SHA for 30a41ff
packages/vite/src/node/plugins/resolve.ts
@@ -773,8 +773,15 @@ export function tryNodeResolve(
773
}
774
let resolvedId = id
775
if (deepMatch && !pkg?.data.exports && path.extname(id) !== resolvedExt) {
776
- resolvedId = resolved.id.slice(resolved.id.indexOf(id))
777
- debug?.(`[processResult] ${colors.cyan(id)} -> ${colors.dim(resolvedId)}`)
+ // id date-fns/locale
+ // resolve.id ...date-fns/esm/locale/index.js
778
+ const index = resolved.id.indexOf(id)
779
+ if (index > -1) {
780
+ resolvedId = resolved.id.slice(index)
781
+ debug?.(
782
+ `[processResult] ${colors.cyan(id)} -> ${colors.dim(resolvedId)}`,
783
+ )
784
+ }
785
786
return { ...resolved, id: resolvedId, external: true }
787
0 commit comments