Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: handle views imported in script setup #1051

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

Merged
merged 2 commits into from
Jun 2, 2023

Conversation

rigor789
Copy link
Member

@rigor789 rigor789 commented Jun 2, 2023

Fixes #1017

When importing a {N} view in script setup and using it with the same name in the template, Vue tries to resolve the {N} view as a component and it fails. With this change, we override the render helpers to hijack the first type argument, and detect when it's a {N} view (or a known component) and we return it's name instead, so the renderer can render it correctly.

@rigor789 rigor789 merged commit fb53eb0 into main Jun 2, 2023
@rigor789 rigor789 deleted the fix/script-setup-core-view-import-conflicts branch June 2, 2023 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Error when importing and using a core component in the template
1 participant