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

vue2 reports errors using jsx in the .vue file in vite5 #26

Open
liangyi-h5 opened this issue May 21, 2024 · 4 comments
Open

vue2 reports errors using jsx in the .vue file in vite5 #26

liangyi-h5 opened this issue May 21, 2024 · 4 comments

Comments

@liangyi-h5
Copy link

-- The JSX syntax extension is not currently enabled
-- The esbuild loader for this file is currently set to "js" but it must be set to "jsx" to be able to parse JSX syntax. You can use "loader: { '.js': 'jsx' }" to do that

image

@liangyi-h5
Copy link
Author

image

Minimum demo

@liangyi-h5
Copy link
Author

demo

@liangyi-h5
Copy link
Author

It has been taken care of. The @vue/compiler-sfc plug-in needs to be added, but there will be problems.

@liangyi-h5
Copy link
Author

Use this plug-in to solve
plugin-vue2-jsx-vite5

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

1 participant