Incorrect transform of Vue components written in `TSX`
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 25/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- typescript
- 领域
- build-system
调研方向
未提供仓库文件、测试或可复现案例。首先定位 TSX 组件转换的入口点,并比较使用 vue/jsx-runtime 的输出与使用 createVNode 的输出。当 TSX 组件转换时不再出现报告中的 Vue 警告,并且有一个覆盖生成输出的回归测试时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
Describe the bug
When transform tsx components, they are converted to js files using the jsx function from vue/jsx-runtime. This results in warnings from Vue, as shown in the screenshot below. Code is how it looks in the browser.
export default defineComponent({
setup(_, { slots }) {
return () => /* @__PURE__ */ jsx(
"div",
{
children: slots.default?.()
}
);
}
});
However, if the tsx components are left as is, they are converted to js files using the createVNode function from vue. In this case, no errors occur. Code is how it looks in the browser.
const __default__ = defineComponent({
setup(_, {
slots
}) {
return () => _createVNode("div", {
"data-v-inspector": ".nuxt/layouts.wms-auth.300d01f6.tsx:6:3"
}, [slots.default?.()]);
}
});
export default __default__
Reproduction
I can't provide reproduction because I'm using an internal UI Kit
- 主要语言
- TypeScript
- 星标
- 277
- 派生
- 36
- 平均合并
- 2 小时 46 分钟
- 30 天内合并 PR
- 2
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
nuxt/module-builder 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 68/100
nuxt/module-builder#801 ·
-
enhancement
难度 3/5 1-2 天 新手友好度 48/100
nuxt/module-builder#764 ·
-
难度 3/5 1-2 天 新手友好度 45/100
nuxt/module-builder#754 ·
-
Conflict between folder structure in readme (src/runtime) and TypeScript config (src/module/runtime)可能已有人在做 @dword-design 于 138 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 45/100
nuxt/module-builder#749 ·
-
Tsdown/obuild migration可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 5/5 一周以上 新手友好度 25/100
nuxt/module-builder#726 · 1 条评论 · 1 个 reaction ·
查看 nuxt/module-builder 的全部 Issue
相似的 Issue
-
e2e-failure ready-to-code
难度 2/5 1-3 小时 新手友好度 68/100
redhat-developer/rhdh-plugin-export-overlays#4460 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
维护者通常 1 天内回复
-
docs(api): openapi.yaml still documents gif-tools optimize colors as 2-256 instead of 2, 4, 16, 256未关闭area: backend documentation priority: low
难度 2/5 1-3 小时 新手友好度 84/100
snapotter-hq/SnapOtter#2919 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
obsidianmd/pele#39 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复