You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the type passed to defineProps in combination with defineDefaults is seemingly empty (either actually empty or the interface used for props extends another but doesn't add any additional types) and the value is stored in a variable an error is thrown.
10:25:01 AM [vite] Internal server error: Transform failed with 1 error:
xxx/src/components/HelloWorld.vue:7:26: error: Unexpected "}"
Plugin: vite:vue
File: xxx/src/components/HelloWorld.vue
Unexpected "}"
5 | expose()
6 |
7 | const props = __props as }
| ^
8 |
9 |
at failureErrorWithLog (xxx/node_modules/esbuild/lib/main.js:1493:15)
at xxx/node_modules/esbuild/lib/main.js:1282:29
at xxx/node_modules/esbuild/lib/main.js:629:9
at handleIncomingPacket (xxx/node_modules/esbuild/lib/main.js:726:9)
at Socket.readFromStdout (xxx/node_modules/esbuild/lib/main.js:596:7)
at Socket.emit (node:events:390:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Socket.Readable.push (node:internal/streams/readable:228:10)
at Pipe.onStreamRead (node:internal/stream_base_commons:199:23)
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
Describe the bug
If the type passed to defineProps in combination with defineDefaults is seemingly empty (either actually empty or the interface used for props extends another but doesn't add any additional types) and the value is stored in a variable an error is thrown.
Reproduction
Considering the following, empty component:
where
Props
can also beor
or not used at all:
throws an error:
System Info
Used Package Manager
npm
Logs
Validations
The text was updated successfully, but these errors were encountered: