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

怎样手动热更新一个虚拟模块? #11761

Closed
aliuq opened this issue May 5, 2022 · 2 comments
Closed

怎样手动热更新一个虚拟模块? #11761

aliuq opened this issue May 5, 2022 · 2 comments
Labels
F-vue3 Framework - Vue 3 T-h5 Target - 编译到 H5 V-3 Version - 3.x

Comments

@aliuq
Copy link
Contributor

aliuq commented May 5, 2022

相关平台

H5

**浏览器版本: Chrome 100 **
使用框架: Vue 3

复现步骤

有一个在app.ts文件内的虚拟模块,在其他页面操作时,会自动更新这个虚拟模块,但是浏览器和小程序没有热更新,请问下,如何手动执行热更新,我尝试了module.hotimport.meta.webpackHot都不行

期望结果

能够正常进行热更新

实际结果

虚拟模块没有热更新

环境信息

👽 Taro v3.4.8


  Taro CLI 3.4.8 environment info:
    System:
      OS: Windows 10
    Binaries:
      Node: 14.19.1 - C:\scoop_soft\apps\nvm\current\nodejs\nodejs\node.EXE
      Yarn: 1.22.10 - C:\scoop_soft\apps\yarn\current\global\node_modules\.bin\yarn.CMD
      npm: 6.14.16 - C:\scoop_soft\apps\nvm\current\nodejs\nodejs\npm.CMD
@taro-bot2 taro-bot2 bot added F-vue3 Framework - Vue 3 T-h5 Target - 编译到 H5 V-3 Version - 3.x labels May 5, 2022
@ZakaryCode
Copy link
Contributor

给个 demo 看看怎么写的咯

@aliuq
Copy link
Contributor Author

aliuq commented Jun 1, 2022

给个 demo 看看怎么写的咯

之前出现问题以为是没有触发热更新,实际上是因为虚拟模块的占位符没有被改变,导致前端没有更新,手动热更新应该是更改虚拟模块的占位符内容就可以触发热更新

@aliuq aliuq closed this as completed Jun 1, 2022
@ZakaryCode ZakaryCode moved this to Done in H5 Apr 10, 2023
@ZakaryCode ZakaryCode added this to H5 Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-vue3 Framework - Vue 3 T-h5 Target - 编译到 H5 V-3 Version - 3.x
Projects
Archived in project
Development

No branches or pull requests

2 participants