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]4.0.4 react 无法渲染 HTML #16408

Closed
woai3c opened this issue Aug 27, 2024 · 5 comments
Closed

[BUG]4.0.4 react 无法渲染 HTML #16408

woai3c opened this issue Aug 27, 2024 · 5 comments
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x

Comments

@woai3c
Copy link

woai3c commented Aug 27, 2024

相关平台

微信小程序

小程序基础库: 3.5.3
使用框架: React

复现步骤

下载 taro 模板后按文档示例跑,无法渲染 HTML。

期望结果

正常渲染 HTML

实际结果

无法渲染 HTML

环境信息

  Taro CLI 4.0.4 environment info:
    System:
      OS: Windows 10 10.0.19045
    Binaries:
      Node: 20.16.0 - D:\software\nodejs\node.EXE
      Yarn: 1.22.22 - D:\software\nodejs\yarn.CMD
      npm: 10.8.1 - D:\software\nodejs\npm.CMD
    npmPackages:
      @tarojs/cli: 4.0.4 => 4.0.4
      @tarojs/components: 4.0.4 => 4.0.4
      @tarojs/helper: 4.0.4 => 4.0.4
      @tarojs/plugin-framework-react: 4.0.4 => 4.0.4
      @tarojs/plugin-html: 4.0.4 => 4.0.4
      @tarojs/plugin-platform-alipay: 4.0.4 => 4.0.4
      @tarojs/plugin-platform-h5: 4.0.4 => 4.0.4
      @tarojs/plugin-platform-jd: 4.0.4 => 4.0.4
      @tarojs/plugin-platform-qq: 4.0.4 => 4.0.4
      @tarojs/plugin-platform-swan: 4.0.4 => 4.0.4
      @tarojs/plugin-platform-tt: 4.0.4 => 4.0.4
      @tarojs/plugin-platform-weapp: 4.0.4 => 4.0.4
      @tarojs/react: 4.0.4 => 4.0.4
      @tarojs/runtime: 4.0.4 => 4.0.4
      @tarojs/shared: 4.0.4 => 4.0.4
      @tarojs/taro: 4.0.4 => 4.0.4
      @tarojs/taro-loader: 4.0.4 => 4.0.4
      @tarojs/vite-runner: 4.0.4 => 4.0.4
      @tarojs/webpack5-runner: 4.0.4 => 4.0.4
      babel-preset-taro: 4.0.4 => 4.0.4
      react: ^18.0.0 => 18.3.1
@taro-bot2 taro-bot2 bot added F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Aug 27, 2024
@woai3c
Copy link
Author

woai3c commented Aug 27, 2024

改成 3.x 版本已经正常了。

@ccqgithub
Copy link

vue 也是, v-html 不能用

@woai3c
Copy link
Author

woai3c commented Aug 28, 2024

vue 也是, v-html 不能用

原生渲染的 html 功能不能用,导致上层的 react vue 都用不了。我已经回退到 3.6.35 版本了,手动降级下依赖就行,其他都不用动。

@TheKonka
Copy link
Member

可以在编译配置里面 临时加下这个 alias 看看
@tarojs/runtime': require.resolve('@tarojs/runtime')

@woai3c
Copy link
Author

woai3c commented Aug 31, 2024

可以在编译配置里面 临时加下这个 alias 看看 @tarojs/runtime': require.resolve('@tarojs/runtime')

ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Projects
Archived in project
Development

No branches or pull requests

5 participants
@ccqgithub @woai3c @TheKonka and others