Skip to content

Static properties on components #578

@DylanPiercey

Description

@DylanPiercey

Currently as far as I can tell this is not possible.

I would imagine it would be something like:

<p>Hello World</p>
<script>
export const meta = 'my meta data'
export default {...}
</script>

Then you could consume this programatically like so:

import MyComponent, { meta } from './my-component.html'

console.log(meta)

I think this would be handy to have and am curious what others think and if there are other ways to achieve this effect (perhaps using methods as getters).

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