taro 4.0.3初始化一个鸿蒙项目,修改代码不实时刷新,导致编译后生成的代码还是旧的,必须重新启动dev:harmony才可以(只有4.0.0-beta.25表现正常)

ufj5ltwl  于 3个月前  发布在  Harmony
关注(0)|答案(1)|浏览(52)

相关平台

鸿蒙

复现仓库

https://github.com/fanlvwen/harmony-test.git

使用框架: React

复现步骤

打开项目, yarn 之后直接运行 yarn dev:harmony 即可

期望结果

改动代码后,自动编译

实际结果

只有4.0.0-beta.25会自动编译,4.0.3以及4.0.4皆不自动编译

环境信息

Taro CLI 4.0.0-beta.117 environment info:
    System:
      OS: Windows 10 10.0.17763
    Binaries:
      Node: 18.20.4 - D:\nodejs\node.EXE
      Yarn: 1.22.22 - D:\nodejs\yarn.CMD
      npm: 10.7.0 - D:\nodejs\npm.CMD
    npmPackages:
      @tarojs/cli: 4.0.3 => 4.0.3
      @tarojs/components: 4.0.3 => 4.0.3
      @tarojs/helper: 4.0.3 => 4.0.3
      @tarojs/plugin-framework-react: 4.0.3 => 4.0.3
      @tarojs/plugin-platform-alipay: 4.0.3 => 4.0.3
      @tarojs/plugin-platform-h5: 4.0.3 => 4.0.3
      @tarojs/plugin-platform-harmony-ets: ^4.0.4 => 4.0.4
      @tarojs/plugin-platform-harmony-hybrid: 4.0.3 => 4.0.3
      @tarojs/plugin-platform-jd: 4.0.3 => 4.0.3
      @tarojs/plugin-platform-qq: 4.0.3 => 4.0.3
      @tarojs/plugin-platform-swan: 4.0.3 => 4.0.3
      @tarojs/plugin-platform-tt: 4.0.3 => 4.0.3
      @tarojs/plugin-platform-weapp: 4.0.3 => 4.0.3
      @tarojs/react: 4.0.3 => 4.0.3
      @tarojs/runtime: 4.0.3 => 4.0.3
      @tarojs/shared: 4.0.3 => 4.0.3
      @tarojs/taro: 4.0.3 => 4.0.3
      @tarojs/vite-runner: 4.0.3 => 4.0.3
      babel-preset-taro: 4.0.3 => 4.0.3
      eslint-config-taro: 4.0.3 => 4.0.3
      react: ^18.0.0 => 18.3.1

异常复现截图:

正常复现截图:

nxagd54h

nxagd54h1#

但是beta.25环境下,编译之后代码是有问题的,导致鸿蒙ide也无法运行

相关问题