Skip to content

Special query for custom Elements #214

@ericfennis

Description

@ericfennis

Related plugins

Description

As a developer, I want to be able to change the behaviour of the vue compiler for Vue components by simply adding a special query to the import.

Currently, it is not possible to have one Vue component as a custom element and a normal Vue component.

Suggested solution

Like the special queries for Assets in Vite, see docs. We could have similar queries for customElement imports without changing the global Vue plugin configurations or changing the file extension.

import Button from './Button.vue?customElement';

// Will import like it is an customElement. Like `button.ce.vue`

Alternative

No response

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions