wocwin / t-ui-plus

基于vue3+ts+Element-plus二次封装基础组件文档;vue3基础组件文档
https://wocwin.github.io/t-ui-plus/
MIT License
272 stars 52 forks source link

不支持TSX的组件 #3

Closed zhaoFangyi closed 1 year ago

zhaoFangyi commented 1 year ago

报错内容:

[plugin:vite:import-analysis] Failed to parse source for import analysis because the content contains invalid JS syntax. If you are using JSX, make sure to name the file with the .jsx or .tsx extension.

组件的内容

仅仅是一个简单的jsx组件 /packages/test-demo/src/test-demo.vue

<script lang="tsx">
export default {
  name: 'TestDemo',
  render() {
    const hasContent = false
    return <div>{hasContent || <el-input />}</div>
  },
}
</script>
zhaoFangyi commented 1 year ago

知道为什么了,加了一个vite.config.js

JACK-ZHANG-coming commented 11 months ago

vite.config.js是在哪里加的,加的什么内容?兄弟

zhaoFangyi commented 11 months ago

vite.config.js是在哪里加的,加的什么内容?兄弟

docs/vite.config.ts 中加入@vitejs/plugin-vue-jsx的支持

zhaoFangyi commented 11 months ago

docs/vite.config.ts @.***/plugin-vue-jsx的支持

------------------ 原始邮件 ------------------ 发件人: "wocwin/t-ui-plus" @.>; 发送时间: 2023年11月30日(星期四) 上午10:26 @.>; @.>;"State @.>; 主题: Re: [wocwin/t-ui-plus] 不支持TSX的组件 (Issue #3)

vite.config.js是在哪里加的,加的什么内容?兄弟

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>