@@ -116,11 +116,16 @@ function resolveAsset(
116
116
warnMissing &&
117
117
( ( ! res && ! isLateTag ( name ) ) || ( res && isLateTag ( name ) ) )
118
118
) {
119
- const extra =
120
- type === COMPONENTS
121
- ? `\nIf this is a native custom element, make sure to exclude it from ` +
119
+ let extra = ''
120
+ if ( type === COMPONENTS ) {
121
+ if ( isLateTag ( name ) ) {
122
+ extra = `\nplease do not use built-in tag names as component names.`
123
+ } else {
124
+ extra =
125
+ `\nIf this is a native custom element, make sure to exclude it from ` +
122
126
`component resolution via compilerOptions.isCustomElement.`
123
- : ``
127
+ }
128
+ }
124
129
warn ( `Failed to resolve ${ type . slice ( 0 , - 1 ) } : ${ name } ${ extra } ` )
125
130
}
126
131
@@ -145,14 +150,12 @@ function resolve(registry: Record<string, any> | undefined, name: string) {
145
150
/**
146
151
* @private
147
152
*/
148
- export function resolveSetupReturned ( name :string , setupReturn : any ) {
149
- if ( ! setupReturn ) return name
153
+ export function resolveSetupReturned ( name : string , setupReturn : any ) {
154
+ if ( ! setupReturn ) return name
150
155
const returnValue = setupReturn [ name ]
151
- if ( returnValue && returnValue . __file && isLateTag ( name as string ) ) {
152
- const extra =
153
- `\nIf this is a native custom element, make sure to exclude it from ` +
154
- `component resolution via compilerOptions.isCustomElement.`
155
- warn ( `Failed to resolve component: ${ name } ${ extra } ` )
156
+ if ( returnValue && returnValue . __file && isLateTag ( name as string ) ) {
157
+ const extra = `\nplease do not use built-in tag names as component names.`
158
+ warn ( `Failed to resolve component: ${ name } ,${ extra } ` )
156
159
}
157
160
return returnValue
158
161
}
0 commit comments