Skip to content

Unable to parse vue3 template's Special grammar withDefaults ? #151

@BoxiTon

Description

@BoxiTon

vue component for example :

`


Hello {{ msg }}

    <script lang="ts" setup>
    import { ref, withDefaults } from "vue";

    const props = withDefaults(defineProps<{
      code?: string;
    }>(), {
      code: "aa"
    })

    const msg = ref("1213");
    const color = ref("green");
    </script>
    <style scoped>
      .example {
        background: v-bind('color');
        color: red;
      }
    </style>`

Describe the bug

SyntaxError: Unexpected token, expected "," (9:15)

image

To Reproduce

Expected behavior

Versions

  • Browser (name & version): chrome 94
  • vue3-sfc-loader: 0.8.4

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingunconfirmedUnconfirmed issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions