taro icon indicating copy to clipboard operation
taro copied to clipboard

微信小程序热重载无效

Open happyeveryseconds opened this issue 1 year ago • 12 comments

相关平台

微信小程序

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

复现步骤

  1. npm run dev:weapp 启动小程序
  2. 修改代码
  3. 修改页面的div背景颜色,小程序没有按预期的修改后的效果

期望结果

小程序应该加载修改代码后的背景颜色

实际结果

小程序没有按预期的修改后的效果

环境信息

Taro CLI 3.6.20 environment info:
    System:
      OS: Windows 11 10.0.22631
    Binaries:
      Node: 18.15.0 - C:\Program Files\nodejs\node.EXE
      Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
      npm: 9.5.0 - C:\Program Files\nodejs\npm.CMD
    npmPackages:
      @tarojs/cli: 3.6.20 => 3.6.20
      @tarojs/components: 3.6.20 => 3.6.20
      @tarojs/helper: 3.6.20 => 3.6.20
      @tarojs/plugin-framework-react: 3.6.20 => 3.6.20
      @tarojs/plugin-html: 3.6.20 => 3.6.20
      @tarojs/plugin-platform-alipay: 3.6.20 => 3.6.20
      @tarojs/plugin-platform-h5: 3.6.20 => 3.6.20
      @tarojs/plugin-platform-jd: 3.6.20 => 3.6.20
      @tarojs/plugin-platform-qq: 3.6.20 => 3.6.20
      @tarojs/plugin-platform-swan: 3.6.20 => 3.6.20
      @tarojs/plugin-platform-tt: 3.6.20 => 3.6.20
      @tarojs/plugin-platform-weapp: 3.6.20 => 3.6.20
      @tarojs/react: 3.6.20 => 3.6.20
      @tarojs/runtime: 3.6.20 => 3.6.20
      @tarojs/shared: 3.6.20 => 3.6.20
      @tarojs/taro: 3.6.20 => 3.6.20
      @tarojs/taro-loader: 3.6.20 => 3.6.20
      @tarojs/webpack5-runner: 3.6.20 => 3.6.20
      babel-preset-taro: 3.6.20 => 3.6.20
      eslint-config-taro: 3.6.20 => 3.6.20
      react: ^18.0.0 => 18.2.0

happyeveryseconds avatar Dec 30 '23 12:12 happyeveryseconds

小程序3.2.5 taro3.6.21 只有第一次保存生效 之后就无效

M0ql avatar Jan 04 '24 07:01 M0ql

这个特性对开发效率影响很大,能否解决下

happyeveryseconds avatar Jan 06 '24 03:01 happyeveryseconds

同求问题解决方案,这个太影响效率了。

SummerXZX avatar Jan 07 '24 10:01 SummerXZX

taro 3.6.16,也遇到同样的问题

mSumbur avatar Jan 09 '24 08:01 mSumbur

我现在的解决方法是现在h5模式下开发,然后微调的时候或者一定要在微信小程序调试的时候,才切换过去。这样起码能把这个问题绕过去一些。

happyeveryseconds avatar Jan 09 '24 08:01 happyeveryseconds

是不是用了 webpack5 的问题? 重新建了项目,用 webpack4 没问题

mSumbur avatar Jan 09 '24 08:01 mSumbur

微信开发者工具,【启用代码自动热重载】关闭了吗?

dzhiqin avatar Jan 11 '24 07:01 dzhiqin

是不是用了 webpack5 的问题? 重新建了项目,用 webpack4 没问题

用的是webpack5, webpack4没试

happyeveryseconds avatar Jan 13 '24 02:01 happyeveryseconds

每次修改代码,保存下,小程序开发工具就开始转圈圈,可以转好久,太影响效率了,小程序开发工具原生的效率高多了,啥时候解决下?

501956430 avatar Mar 15 '24 09:03 501956430

把微信开发者工具的自动保存关了或许有效

LeslieChan66 avatar Apr 21 '24 19:04 LeslieChan66

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

501956430 avatar Apr 21 '24 19:04 501956430

image image 重启项目就好了

lixy01 avatar May 18 '24 05:05 lixy01