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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ideas and thoughts on populating components.d.ts from scratch #718

Open
Vanilagy opened this issue Nov 29, 2023 · 0 comments
Open

Ideas and thoughts on populating components.d.ts from scratch #718

Vanilagy opened this issue Nov 29, 2023 · 0 comments

Comments

@Vanilagy
Copy link

Because it qualifies as "derived state", we do not check in our components.d.ts file into source control. For our typechecking CI actions, it is crucial that all of the components be declared in this file so that all errors can be caught. However, since the file only gets extended / populated when a given component gets compiled by Vite, I am not sure how to properly generate this file from scratch.

One approach that does work and that does hit all components is simply:

vite build

But this is quite slow and costly, since it runs an entire build. I'd rather have something that walks the depencency tree like Vite does, and transform Vue components using this plugin, but that's all it does and it also doesn't emit any built files.

Has this been attempted before, or does any of you have suggestions how I might approach something like this? Maybe a build piped to /dev/null? Or is there something more direct this library offers?

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

No branches or pull requests

1 participant