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

ViewUI migration build got max call stack exceeded error #5236

Closed
cool-little-fish opened this issue Jan 10, 2022 · 2 comments
Closed

ViewUI migration build got max call stack exceeded error #5236

cool-little-fish opened this issue Jan 10, 2022 · 2 comments

Comments

@cool-little-fish
Copy link
Contributor

cool-little-fish commented Jan 10, 2022

Version

3.2.26

Reproduction link

jsfiddle.net/pqmaxg8w/4/

Steps to reproduce

  1. config project (written with vue2 before) under migration build guide
  2. the project use ViewUI as its dependency

What is expected?

After following the migration guide, there should be no error.

What is actually happening?

Got max call stack exceeded error.


I found the error was raised in file Button.vue.

And in this line, it was meant to resolve to be a normal button, unfortunately, it resolved to self unexpectedly.

The reason was the the difference between resolveAssets(vue3) and resolveAssets(vue2).

In vue 2, there was no special handle for dynamic compnent to resolve to be itself, but vue 3 did. That was where this error came from.

For some UI lib like ViewUI, which did not use prefix for their component name, their user will be stuck by this kind of error in the way of migration build.

So I guess it's better if vue3 could keep consistent with vue2 in this point.

@cool-little-fish cool-little-fish changed the title ViewUI migration Build got max call stack exceeded error ViewUI migration build got max call stack exceeded error Jan 10, 2022
@yyx990803
Copy link
Member

yyx990803 commented Jan 21, 2022

Vue 3's resolving logic self-resolves if the component's name option matches. That's the intended behavior. ViewUI should add a prefix to the name option to all components that have overlapping name with native HTML elements.

Prefix-less components + native element name is explicitly prohibited in the style guide.

@cool-little-fish
Copy link
Contributor Author

sorry to comment under a closed issue, but If I want to continue to use the migration build, is there a possible workaround for this case ?@yyx990803

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

Successfully merging a pull request may close this issue.

3 participants