Skip to content

Support passing props to vue serve {component} #1681

@brandon93s

Description

@brandon93s

What problem does this feature solve?

When developing a component in isolation with cli-service-global and vue serve there is often a need to pass props to the component. This is particularly true when building a component that needs to expose a "public API" via props. Currently, to use vue serve in development, one must hard code prop values as "defaults" to pass the desired data into the component.

What does the proposed API look like?

The props could either be self-contained in a JSON file or passed via the CLI.

vue serve MyComponent.vue  sampleProps.json

vue serve MyComponent.vue  --propA="Bob" --propB=9

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions