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

Vite plugins run in production runtime #157

Open
olehakon opened this issue Jan 27, 2025 · 0 comments
Open

Vite plugins run in production runtime #157

olehakon opened this issue Jan 27, 2025 · 0 comments

Comments

@olehakon
Copy link

Hi!

I love the plugin and I think it works really well!

The only thing that I'm struggling a bit with is that the Vite plugins are run in production when I start my express server. For example I'm using Tanstack Router Vite plugin, which seems to run route tree generation when I start the server in production. Since this is taking some time, the startup time gets unnecessary long.

I looked at the code and it seems that the vite config is loaded with command="build" and mode "development", which is not try at all. If any it should be command="serve" and mode="production". I suspect plugins to use these variables to decide what to do.

I am wondering if it is really necessary to import the vite config file as a ts module or if we could just read it as a plain text file as default?

If "root", "base" and "outDir" is the only parameters that we care about, maybe we could just provide them as config parameters and make them required?

Do we need the Vite package at all?

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