vite-plugin-vue icon indicating copy to clipboard operation
vite-plugin-vue copied to clipboard

Special query for custom Elements

Open ericfennis opened this issue 1 year ago • 0 comments

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

ericfennis avatar Jul 27 '23 10:07 ericfennis