vitejs / vite-plugin-vue2-jsx

Vite plugin for Vue 2.7 JSX support
MIT License
58 stars 6 forks source link

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

Open liangyi-h5 opened 3 months ago

liangyi-h5 commented 3 months ago

-- 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 commented 3 months ago

image

Minimum demo

liangyi-h5 commented 3 months ago

demo

liangyi-h5 commented 3 months ago

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

liangyi-h5 commented 3 months ago

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