Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
fix(vite): respect ctx.nuxt.options.modulesDir for resolving extern…
Browse files Browse the repository at this point in the history
…als with `vite-node` (#7612)
  • Loading branch information
pi0 committed Sep 16, 2022
1 parent 8621c86 commit abd0feb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/vite-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function createViteNodeMiddleware (ctx: ViteBuildContext, invalidates: Set<strin
node.shouldExternalize = async (id: string) => {
const result = await isExternal(id)
if (result?.external) {
return resolveModule(result.id, { url: ctx.nuxt.options.rootDir })
return resolveModule(result.id, { url: ctx.nuxt.options.modulesDir })
}
return false
}
Expand Down

0 comments on commit abd0feb

Please sign in to comment.