unplugin/unplugin-vue-components

Does this support JSX?

Closed this issue · 1 comments

version:
vue: 3.2.16
ant-design-vue: 3.0.0-alpha.11
unplugin-vue-components: 0.17.2

My plugins config like this:

plugins: [
    vue(),
    vueJsx({}),
    Components({
      resolvers: [AntDesignVueResolver()],
      dts: true,
      include: [/\.vue$/, /\.tsx$/, /\.ts$/, /\.vue\?vue/, /\.md$/],
    }),
  ],

And here is my code:

import { defineComponent } from 'vue'
import { Button } from 'ant-design-vue'

export default defineComponent({
  setup() {
    return () => (
      <>
        <div>This is can be a success</div>
        <Button>JSX</Button>
      </>
    )
  }
})

But I still got the whole antdv package loaded in the dev environment.
Does this support JSX? Or I wrote a wrong config?

antfu commented

Sorry no, it does not support JSX.