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

feat: compatible with plugin-vue-jsx #479

Merged
merged 1 commit into from
Aug 4, 2022

Conversation

LiZhequ
Copy link
Contributor

@LiZhequ LiZhequ commented Aug 3, 2022

Description

In SFC, When using some plugin like plugin-vue-jsx, resolveComponent will be imported as _resolveComponent1 to avoid duplicate import. Change the RegExp /_resolveComponent\("(.+?)"\)/g to /_resolveComponent[0-9]*\("(.+?)"\)/g so that the component in jsx can be imported normally.

In fact, when you using a jsx file or runing vite in dev mode, it is also normal, but build mode is not.This may be confusing and cause bug. So I think it's necessary to fix it.

Linked Issues

Additional context

@LiZhequ LiZhequ requested a review from antfu as a code owner August 3, 2022 10:38
@antfu antfu changed the title feat: plugin-vue-jsx feat: compatible with plugin-vue-jsx Aug 4, 2022
@antfu antfu merged commit 1bfd787 into unplugin:main Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants