Skip to content

Commit 2b87665

Browse files
authored
fix(resolve): don't modify resolve options (#468)
1 parent 4168e80 commit 2b87665

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/vite/src/node/plugins/resolve.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,9 +351,11 @@ export function oxcResolvePlugin(
351351
return newResolvedId === resolvedId ? undefined : newResolvedId
352352
},
353353
resolveSubpathImports(id, importer, isRequire, scan) {
354-
options.isRequire = resolveOptions.isRequire ?? isRequire
355-
options.scan = scan
356-
return resolveSubpathImports(id, importer, options)
354+
return resolveSubpathImports(id, importer, {
355+
...options,
356+
isRequire: resolveOptions.isRequire ?? isRequire,
357+
scan,
358+
})
357359
},
358360

359361
...(partialEnv.config.command === 'serve'

0 commit comments

Comments
 (0)