mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 21:55:11 +00:00
fix(nitro): improve externals error handling (#1188)
This commit is contained in:
parent
47c004ac97
commit
80883cfb8f
@ -52,8 +52,12 @@ export function externals (opts: NodeExternalsOptions): Plugin {
|
||||
|
||||
// Track externals
|
||||
if (opts.trace !== false) {
|
||||
const resolved = await this.resolve(originalId, importer, { ...options, skipSelf: true }).then(r => r.id)
|
||||
trackedExternals.add(resolved)
|
||||
const resolved = await this.resolve(originalId, importer, { ...options, skipSelf: true })
|
||||
if (!resolved) {
|
||||
console.warn(`Could not resolve \`${originalId}\`. Have you installed it?`)
|
||||
} else {
|
||||
trackedExternals.add(resolved.id)
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user