Closed jfrank14 closed 5 months ago
I'm trying to run the SFC loader on the out of the box application generated by vue. This app has an App.vue that references a component HelloWorld.vue that does this:
<script setup lang="ts"> defineProps<{ msg: string }>() </script>
When I do this, I get the following error in the browser:
error parse script /vue/src/components/HelloWorld.vue 4 | props: { 5 | msg: { type: String, required: true } > 6 | } as unknown as undefined, | ^ Unexpected token, expected "," (6:4) 7 | setup(__props: { 8 | msg: string 9 | }, { expose }) {
Does the parser not know how to handle the new defineProps syntax?
defineProps
I'm trying to run the SFC loader on the out of the box application generated by vue. This app has an App.vue that references a component HelloWorld.vue that does this:
When I do this, I get the following error in the browser:
Does the parser not know how to handle the new
defineProps
syntax?