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

Export ViteConfig so code using ViteExpress can statically type the inlineConfig #141

Open
odahcam opened this issue Aug 5, 2024 · 1 comment

Comments

@odahcam
Copy link

odahcam commented Aug 5, 2024

Currently I'm creating inlineConfig only if I have certain given environment variables:

Screenshot 2024-08-05 at 10 28 34

Without ViteConfig TS complains about my inline config object.

@szymmis
Copy link
Owner

szymmis commented Aug 29, 2024

Hi @odahcam, sorry for the delay. I think it would absolutely make sense to expose this type to the user but it isn't as easy as I though as I'm struggling with type definition generation. I guess I could just write types by hand as the API isn't changing that much nowadays but I'm not a big fan of this idea because code would no longer be the source of truth for the type declaration file.

I'll look into it a little bit more and I'll try to come back with something!

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

2 participants