vite: vue unref error
⚠️ IMPORTANT ⚠️ Please check the following list before proceeding. If you ignore this issue template, your issue will be directly closed.
- Read the docs.
- Use Vite >=2.0. (1.x is no longer supported)
- If the issue is related to 1.x -> 2.0 upgrade, read the Migration Guide first.
Describe the bug
@yyx990803 I think there will be many such problems in this update
<script lang="ts">
import { defineComponent, ref, unref } from 'vue';
export default defineComponent({
name: 'App',
setup() {
const count = ref(0);
console.log(unref(count));
return {};
},
});
</script>
Reproduction
git clone https://github.com/anncwb/vite-bug yarn && yarn serve
System Info
vite
version:beta.41- Operating System:
- Node version:
- Package manager (npm/yarn/pnpm) and version:
Logs (Optional if provided reproduction)
- Run
vite
orvite build
with the--debug
flag. - Provide the error log here.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 20 (18 by maintainers)
Commits related to this issue
- fix(optimizer): fix entry matching edge case fix #1661 again — committed to vitejs/vite by yyx990803 3 years ago
I think it should be fixed by 4c4d629.
@ResuBaka
@vue/server-renderer
should be moved todevDependencies
or excluded for optimization.