Vue version
3.2.47
Link to minimal reproduction
https://github.com/Cqqgyh/vue3-init-demo
Steps to reproduce
/src/components/HelloWorld.vue
bug
// todo start bug
const part2RightTextList = reactive([
{
text: 'demo',
isChecked: true,
}
])
// 如果在目录中解开注释,打包后将无法预览查看
// 重现条件:同时使用{immediate: true, deep: true}
watch( ()=> part2RightTextList, (newValue, oldValue) => {
part2RightTextList[0].isChecked = !!newValue.every(item => !item.isChecked);
}, {immediate: true, deep: true})
// end bug
What is expected?
希望解决掉这个bug
What is actually happening?
watch 同时使用 {immediate: true, deep: true},开发中可以使用,打包后使用vite preview命令,无法正常预览,上线到服务器也无法查看。
System Info
No response
Any additional comments?
No response