vite-plugin-vue
vite-plugin-vue copied to clipboard
Special query for custom Elements
Related plugins
-
[X] plugin-vue
-
[ ] plugin-vue-jsx
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
- [X] Follow our Code of Conduct
- [X] Read the Contributing Guidelines.
- [X] Read the docs.
- [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.