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

Support vite(6) as config loader #202

Open
1 task done
pi0 opened this issue Nov 13, 2024 · 3 comments
Open
1 task done

Support vite(6) as config loader #202

pi0 opened this issue Nov 13, 2024 · 3 comments
Labels
discussion enhancement New feature or request

Comments

@pi0
Copy link
Member

pi0 commented Nov 13, 2024

Describe the feature

(context: quickly talking with @yyx990803)

Vite 6 with environment API allows loading ts config files similar to jiti.

We can optionally support vite as a config loader for .ts support, faster resolutions, custom plugins, etc.

/cc @danielroe @antfu @patak-dev would love to hear your early thoughts!

Additional information

  • Would you be willing to help implement this feature?
@pi0 pi0 added enhancement New feature or request discussion labels Nov 13, 2024
@patak-dev
Copy link

cc @sheremet-va

@sheremet-va
Copy link

sheremet-va commented Nov 13, 2024

We had an idea to expose this as a function like “import” (inlines the environment when called, not good for performance or memory to be honest 👀) and possibly introduce “vite run” command in the future.

@pi0
Copy link
Member Author

pi0 commented Nov 14, 2024

@sheremet-va Maybe it could be coupled with an unimport() API (mimicking clear require.cache) that allows to free-up memory? We probably need something similar to also allow reloading config same as jiti with disabled cache.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants