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: support tsx, jsx by default and add option defaultExportByFilename #294

Merged
merged 2 commits into from Nov 25, 2022

Conversation

niku98
Copy link
Contributor

@niku98 niku98 commented Nov 22, 2022

Description

Add support for React Component as an option.

Updated:

  • Support tsx, jsx by default
  • Add option defaultExportByFilename: boolean
    • When true, use file name as default export's alias

Linked Issues

#268

Additional context

No.

@antfu
Copy link
Member

antfu commented Nov 22, 2022

I'd prefer to keep this plugin framework-agnostic. I think including tsx and jsx by default sounds reasonable. We might use need the option named defaultExportByFilename to include default exports for your case.

@niku98
Copy link
Contributor Author

niku98 commented Nov 22, 2022

I'd prefer to keep this plugin framework-agnostic. I think including tsx and jsx by default sounds reasonable. We might use need the option named defaultExportByFilename to include default exports for your case.

This sounds good, hope that it will be shipped soon.

@antfu
Copy link
Member

antfu commented Nov 22, 2022

You could push changes directly to this branch if you want to work on that

@niku98
Copy link
Contributor Author

niku98 commented Nov 22, 2022

You could push changes directly to this branch if you want to work on that

Oh, yes. Let's me try

@niku98 niku98 changed the title feat: auto import react component feat: support tsx, jsx by default and add optiondefaultExportByFilename Nov 23, 2022
@niku98 niku98 changed the title feat: support tsx, jsx by default and add optiondefaultExportByFilename feat: support tsx, jsx by default and add option defaultExportByFilename Nov 23, 2022
@niku98
Copy link
Contributor Author

niku98 commented Nov 25, 2022

@antfu Hi, I have pushed for a while. Can u review and merge if it is ok?

@antfu antfu merged commit 632305e into unplugin:main Nov 25, 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

2 participants