Skip to content

Commit

Permalink
chore: improve component resolution failure message
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Sep 17, 2021
1 parent 51f7467 commit 71f2206
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/runtime-core/src/helpers/resolveAssets.ts
Expand Up @@ -110,7 +110,12 @@ function resolveAsset(
}

if (__DEV__ && warnMissing && !res) {
warn(`Failed to resolve ${type.slice(0, -1)}: ${name}`)
const extra =
type === COMPONENTS
? `\nIf this is a native custom element, make sure to exclude it from ` +
`component resolution via compilerOptions.isCustomElement.`
: ``
warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`)
}

return res
Expand Down

0 comments on commit 71f2206

Please sign in to comment.