Skip to content

defineProps is not compiled in a nested scope in SFC script setup #4469

Closed
@juzerzarif

Description

@juzerzarif

Version

3.2.6

Reproduction link

sfc.vuejs.org/

Steps to reproduce

Call defineProps in a script setup SFC file in a scope that is not at the top level.

What is expected?

defineProps should be compiled to __props

What is actually happening?

defineProps is called at runtime causing a ReferenceError


Implementation like the repo example is useful when defining a component with generic props

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions