Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add a components api to allow manual detection in frameworks #329

Merged
merged 3 commits into from
Mar 17, 2022

Conversation

ElMassimo
Copy link
Contributor

@ElMassimo ElMassimo commented Mar 17, 2022

Description 馃摉

This pull requests adds an api to unplugin-vue-components, allowing it to be used programmatically.

The benefit of exposing an API is that frameworks can easily integrate with this plugin and leverage any component resolvers that the user has already configured, providing a consistent DX.

Examples 馃摑

卯les uses this api to resolve components inside islands.

It also can conditionally inject imports based on whether the islands are SSR-compatible. This is an advanced use case that wouldn't be possible if the user imported components manually.

@ElMassimo ElMassimo requested a review from antfu as a code owner March 17, 2022 18:44
src/types.ts Outdated Show resolved Hide resolved
@antfu antfu merged commit fa4ca99 into unplugin:main Mar 17, 2022
@ElMassimo ElMassimo deleted the api branch March 21, 2022 01:31
@ElMassimo
Copy link
Contributor Author

Thanks for merging and making a release so fast! 馃槂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants