#15602·Vue.js

defineModel with default function accessing destructured prop causes [PARSE_ERROR] Expected `,` or `)` but found `Identifier`

Author: kleinfreundCreated Sep 22, 2026Updated Sep 24, 2026
Labelsscope: sfc:hammer: p3-minor-bug

Vue version

3.5.43

Link to minimal reproduction

https://stackblitz.com/edit/vitejs-vite-qz8mzlh4?file=src%2FApp.vue

Steps to reproduce

  1. Run any command that would transform App.vue with @vitejs/plugin-vue (like vite).

Note, that the reproduction is currently broken due to a stackblitz issue seemingly caused by https://github.com/rolldown/rolldown/issues/10938.

xml
<template>
  <input v-model="model" />
</template>

<script setup lang="ts">
const { defaultValue = '' } = defineProps<{ defaultValue?: string }>();
const model = defineModel<string>({
  default: () => defaultValue,
  // Intentionally avoiding the `props` parameter of the default function as it's not properly typed.
  // default: (props) => props.defaultValue,
});
</script>

What is expected?

No error occurs.

What is actually happening?

The following error occurs:

[PARSE_ERROR] Expected `,` or `)` but found `Identifier`
    ╭─[ src/App.vue:34:54 ]
    │
 34 │ const model = _useModel<string>(__props, "modelValue"__props.defaultValue);
    │                                ┬                     ───┬───  
    │                                ╰────────────────────────────── Opened here
    │                                                         │     
    │                                                         ╰───── `,` or `)` expected
────╯

  Plugin: vite:vue

System Info

bash

Any additional comments?

  • I'm deliberately not using the props parameter passed to the model's default function as it isn't typed properly (well, it's typed as Record<string, unknown> but doesn't infer/use the prop interface type, see https://github.com/vuejs/rfcs/discussions/836). Also, if I were to use it, I'd now need to ignore the @typescript-eslint/no-unused-vars error on the destructured prop that isn't used elsewhere