Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: [email protected] embed 不支持解析 tsx了吗? #1790

Closed
nanianlisao opened this issue Jul 27, 2023 · 1 comment
Closed

bug: [email protected] embed 不支持解析 tsx了吗? #1790

nanianlisao opened this issue Jul 27, 2023 · 1 comment
Labels
no plan This will not be worked on

Comments

@nanianlisao
Copy link
Contributor

[email protected]中, 通过

<embed src="./xxx.tsx"/> 

可以解析出 ./xxx.tsx 的内容

现在 2.x 版本中, 会将 整个 ./xxx.tsx 的内容都当作 md进行解析,导致一些 组件无法正常渲染

Versions

  • dumi: 2.2.1
  • node: 18.12.1
  • npm: 8.19.2
  • OS:
  • Browser:

Steps to reproduce

What is Expected?

期望能像 1.x版本一样, 对tsx进行解析。或者能够给一个比较良好的升级方案。

What is actually happening?

@nanianlisao nanianlisao added the bug Something isn't working label Jul 27, 2023
@PeachScript
Copy link
Member

不支持 tsx,v1 文档的 embed 用法里也是仅支持 md 的,如果你测试 tsx 能工作应该只是巧合

如果是期望直接嵌入式渲染一个 react 组件,可以使用 code 标签引入 tsx 并加上 inline 属性

@PeachScript PeachScript added no plan This will not be worked on and removed bug Something isn't working labels Jul 27, 2023
@PeachScript PeachScript closed this as not planned Won't fix, can't repro, duplicate, stale Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no plan This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants