-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
Closed
Labels
🍰 p2-nice-to-havePriority 2: this is not breaking anything but nice to have it addressed.Priority 2: this is not breaking anything but nice to have it addressed.has PRA pull request has already been submitted to solve the issueA pull request has already been submitted to solve the issue
Description
Vue version
3.2.45
Link to minimal reproduction
Steps to reproduce
- pnpm dev, open chrome dev tool
- click the button
pnpm dev && pnpm preview
, click button again- compare both console log
What is expected?
both dev and prod mode should work in same way; or the code did not cause recursively update
What is actually happening?
in dev mode, recursive update will stop auto;
in prod mode, it just continue run
System Info
System:
OS: Windows 10 10.0.22621
CPU: (12) x64 Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
Memory: 21.69 GB / 31.92 GB
Binaries:
Node: 16.17.1 - ~\AppData\Local\fnm_multishells\17284_1672413295400\node.EXE
npm: 8.15.0 - ~\AppData\Local\fnm_multishells\17284_1672413295400\npm.CMD
Browsers:
Edge: Spartan (44.22621.963.0), Chromium (108.0.1462.54)
Internet Explorer: 11.0.22621.1
npmPackages:
vue: ^3.2.45 => 3.2.45
Any additional comments?
sfc.vuejs.org even in PROD mode, it still use dev vue file so i upload a github repo.
the key code
watch(() => [state.value.deep], () => {
state.value = { deep: false }
// console.log('watch', ++count)
})
====
english is not my first lang, so i write a chinese version desc here too.
复现:
- clone repo后,跑dev,尝试点击button
- 观察控制台输出
pnpm dev && pnpm preview
, 再次点击button- 再次观察控制台输出
期望:
dev与prod mode两边的行为一致,或者这段代码根本不会产生死循环更新
实际:
dev会在安全范围内停掉这个watch
prod则会跑到死
Metadata
Metadata
Assignees
Labels
🍰 p2-nice-to-havePriority 2: this is not breaking anything but nice to have it addressed.Priority 2: this is not breaking anything but nice to have it addressed.has PRA pull request has already been submitted to solve the issueA pull request has already been submitted to solve the issue