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

Vue crashes when function name is similar to imported component #11437

Open
patchthecode opened this issue Jul 25, 2024 · 2 comments · May be fixed by #11438
Open

Vue crashes when function name is similar to imported component #11437

patchthecode opened this issue Jul 25, 2024 · 2 comments · May be fixed by #11438

Comments

@patchthecode
Copy link

Vue version

3.3.4

Link to minimal reproduction

no link

Steps to reproduce

its easy to reproduce

import ViewComponent from '/src/components/ViewComponent.vue' // can be empty file with just a div

async function viewComponent(index) { // Similar name. but v is small case

}

...
<view-component  /> 

What is expected?

it should work

What is actually happening?

crash

System Info

No response

Any additional comments?

No response

@yyx990803
Copy link
Member

To avoid ambiguity, you should use PascalCase components in SFC templates.

@patchthecode
Copy link
Author

thanks. i'll have to change my way of coding then. will do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants