Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

web components [Vue warn]: Failed to resolve component: xy-button" #1221

Closed
reaink opened this issue May 22, 2020 · 6 comments
Closed

web components [Vue warn]: Failed to resolve component: xy-button" #1221

reaink opened this issue May 22, 2020 · 6 comments

Comments

@reaink
Copy link

reaink commented May 22, 2020

Version

3.0.0-beta.14

Reproduction link

https://jsbin.com/zerohi/edit?html,console,output

Steps to reproduce

According to global API #30 add app.config.ignoredElements = [/ ^ xy- /] still print Vue Warn

What is expected?

Optional close warning

What is actually happening?

print Warn

@Justineo
Copy link
Member

According to the published RFC, it should be:

app.config.isCustomElement = tag => tag.startsWith('xy-')

@reaink
Copy link
Author

reaink commented May 22, 2020

@Justineo Thank you for your reply, I test that there is no problem in jsbin.com, but I run vite in add in app.config.isCustomElement = tag => tag.startsWith ('xy-') There will still be warning, this is vite problem ?

@yyx990803
Copy link
Member

When pre compiling templates, it needs to be configured at the compiler level.

@beetaa
Copy link

beetaa commented Aug 14, 2020

When pre compiling templates, it needs to be configured at the compiler level.

@yyx990803 hi, how to achieve this (configured at the compiler level) while using vue3 and vite? Is that mean I should do it in vite.config.js? I encounter the same situation with this, have you solved the issue? @nshusr thank you.

@beetaa
Copy link

beetaa commented Aug 15, 2020

ok, I got it, #1414 (comment)

@Mount-Isaac
Copy link

Hey, I have a js file and within it, I've created a template where I have placed my HTML code contained in component Product. in the HTML file I have imported the js file directory and likewise configured the product component in the App div. when I reload my page, I don't get my page but by logging in to console, the error is" Failed to resolve component: product
at
warn @ vue@next:1254

@github-actions github-actions bot locked and limited conversation to collaborators Oct 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants