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

use esbuild instead of babel to transform jsx syntax #187

Open
Leonewu opened this issue Jul 24, 2021 · 3 comments
Open

use esbuild instead of babel to transform jsx syntax #187

Leonewu opened this issue Jul 24, 2021 · 3 comments

Comments

@Leonewu
Copy link

Leonewu commented Jul 24, 2021

I am using react and need to display some markdown file.
And when I install vite-plugin-markdown then run dev server, it thorwed an error 'module @babel/preset-react not found' so I have to install it manually.
I just read vite's code about transfroming jsx syntax.It uses esbuild.
I think it is not neccessary to use babel because vite uses esbuild internally.

@Leonewu Leonewu changed the title use esbuild instead of @preset/react to transform to jsx use esbuild instead of @preset/react to transform jsx syntax Jul 24, 2021
@Leonewu Leonewu changed the title use esbuild instead of @preset/react to transform jsx syntax use esbuild instead of @babel/preset-react to transform jsx syntax Jul 24, 2021
@Leonewu Leonewu changed the title use esbuild instead of @babel/preset-react to transform jsx syntax use esbuild instead of babelto transform jsx syntax Jul 24, 2021
@Leonewu Leonewu changed the title use esbuild instead of babelto transform jsx syntax use esbuild instead of babel to transform jsx syntax Jul 24, 2021
@hmsk
Copy link
Owner

hmsk commented Jul 24, 2021

good point. this plugin was originally started by copying frontmatter-markdown-loader which is for Webpack, so React's build was still relying on Babel. Decoupling sounds natural choice to me and I'm going to work on someday but use @babel/core and @babel/preset-react atm if you are eager to use this plugin.

@lebbe
Copy link

lebbe commented May 1, 2022

Would you accept PRs resolving this issue?

@hmsk
Copy link
Owner

hmsk commented May 2, 2022

@lebbe yes if it's compatible with current one! thanks for your offering.

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

No branches or pull requests

3 participants