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

taro4.0.7 webpack使用vueuse的useStorage丢失响应式 #16814

Open
jia-wink opened this issue Nov 5, 2024 · 1 comment
Open

taro4.0.7 webpack使用vueuse的useStorage丢失响应式 #16814

jia-wink opened this issue Nov 5, 2024 · 1 comment
Labels
F-vue3 Framework - Vue 3 T-weapp Target - 编译到微信小程序 V-4 Version - 4.x

Comments

@jia-wink
Copy link

jia-wink commented Nov 5, 2024

相关平台

微信小程序

复现仓库

https://github.com/jia-wink/taroIsses-webpack.git
小程序基础库: 3.6.4
使用框架: Vue 3

复现步骤

在运行项目时候使用--watch模式即可复现,例如执行:pnpm dev:weapp

期望结果

vueuse的useStorage返回的响应式对象能响应式更新

实际结果

proxeyState的实际的值更新了,缓存更新了,但是视图层没有更新,使用watch/computed也没法监听更新

环境信息

Taro CLI 4.0.7 environment info:
    System:
      OS: Windows 11 10.0.22631
    Binaries:
      Node: 18.19.0 - C:\Program Files\nodejs\node.EXE
      Yarn: 1.22.22 - ~\AppData\Roaming\npm\yarn.CMD
      npm: 10.2.3 - C:\Program Files\nodejs\npm.CMD
    npmPackages:
      @tarojs/cli: 4.0.7 => 4.0.7 
      @tarojs/components: 4.0.7 => 4.0.7 
      @tarojs/helper: 4.0.7 => 4.0.7 
      @tarojs/plugin-framework-vue3: 4.0.7 => 4.0.7 
      @tarojs/plugin-platform-alipay: 4.0.7 => 4.0.7 
      @tarojs/plugin-platform-h5: 4.0.7 => 4.0.7
      @tarojs/plugin-platform-harmony-hybrid: 4.0.7 => 4.0.7
      @tarojs/plugin-platform-jd: 4.0.7 => 4.0.7
      @tarojs/plugin-platform-qq: 4.0.7 => 4.0.7
      @tarojs/plugin-platform-swan: 4.0.7 => 4.0.7
      @tarojs/plugin-platform-tt: 4.0.7 => 4.0.7
      @tarojs/plugin-platform-weapp: 4.0.7 => 4.0.7
      @tarojs/runtime: 4.0.7 => 4.0.7
      @tarojs/shared: 4.0.7 => 4.0.7
      @tarojs/taro: 4.0.7 => 4.0.7
      @tarojs/taro-loader: 4.0.7 => 4.0.7
      @tarojs/webpack5-runner: 4.0.7 => 4.0.7
      babel-preset-taro: 4.0.7 => 4.0.7
      eslint-config-taro: 4.0.7 => 4.0.7

补充信息

经过尝试,发现了如下规律

  1. 在没有--watch参数的时候表现正常,
  2. 更换vite也表现正常,但是vite构建会有三方组件库无法渲染的问题(其它issue有提到)
  3. 回退版本到taro3表现正常。
  4. taro4所有版本都表现异常
@TheKonka TheKonka added F-vue3 Framework - Vue 3 T-weapp Target - 编译到微信小程序 V-4 Version - 4.x labels Nov 5, 2024
@LeeSamFong
Copy link

遇到相同问题,同求解决方式

This was referenced Nov 9, 2024
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-weapp Target - 编译到微信小程序 V-4 Version - 4.x
Projects
Status: Todo
Development

No branches or pull requests

3 participants