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

Commit de1aa4e

Browse files
committed
fix(vite): respect ctx.nuxt.options.modulesDir for resolving externals
1 parent 8621c86 commit de1aa4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/vite/src/vite-node.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ function createViteNodeMiddleware (ctx: ViteBuildContext, invalidates: Set<strin
102102
node.shouldExternalize = async (id: string) => {
103103
const result = await isExternal(id)
104104
if (result?.external) {
105-
return resolveModule(result.id, { url: ctx.nuxt.options.rootDir })
105+
return resolveModule(result.id, { url: ctx.nuxt.options.modulesDir })
106106
}
107107
return false
108108
}

0 commit comments

Comments
 (0)