vue3-sfc-loader
vue3-sfc-loader copied to clipboard
Error parse script on 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:
<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?