mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 15:15:19 +00:00
fix(vite): don't set explicit conditions in shouldExternalize
(#22991)
This commit is contained in:
parent
3e676a7fd2
commit
16d47ead2e
@ -132,10 +132,7 @@ function createViteNodeApp (ctx: ViteBuildContext, invalidates: Set<string> = ne
|
|||||||
node.shouldExternalize = async (id: string) => {
|
node.shouldExternalize = async (id: string) => {
|
||||||
const result = await isExternal(id)
|
const result = await isExternal(id)
|
||||||
if (result?.external) {
|
if (result?.external) {
|
||||||
return resolveModule(result.id, {
|
return resolveModule(result.id, { url: ctx.nuxt.options.modulesDir }).catch(() => false)
|
||||||
url: ctx.nuxt.options.modulesDir,
|
|
||||||
conditions: ['node', 'import', 'require']
|
|
||||||
}).catch(() => false)
|
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user