Skip to content

how to use with tsx? #259

@qingtiantongxie

Description

@qingtiantongxie

I use vite vue and ant-design in my project

my vite.config.js

import vue from '@vitejs/plugin-vue'
import VueJsx from '@vitejs/plugin-vue-jsx'
import Components from 'unplugin-vue-components/vite'
import { AntDesignVueResolver } from 'unplugin-vue-components/resolvers'

export default defineConfig({
   plugins: [
    vue(),
    VueJsx(),
    Components({
      resolvers: [AntDesignVueResolver()],
      extensions: ['vue'],
      dts: true,
      include: [/\\.vue$/, /\\.vue\\?vue/, /\\.md$/],
    })
})

and in tsx file , i use Menu component and got 找不到名称“Menu”。ts(2304)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions