vitejs / vite

Next generation frontend tooling. It's fast!
http://vite.dev
MIT License
68.45k stars 6.17k forks source link

tsconfig change doesn't trigger a dev server reload after vite.config.ts change #18538

Open djibarian opened 1 week ago

djibarian commented 1 week ago

Describe the bug

When you make changes to tsconfig.json the dev server reloads fine:

10:47:28 [vite] changed tsconfig file detected: [...]/tsconfig.json - Clearing cache and forcing full-reload to ensure TypeScript is compiled with updated config values.

But if you make changes to vite.config.ts and then to tsconfig, the server doesn't reload anymore:

10:47:41 [vite] vite.config.ts changed, restarting server...
[sentry-vite-plugin] Info: Using environment variables configured in ".env.sentry-build-plugin".
10:47:41 [vite] server restarted.

Making a change to tsconfig now doesn't trigger a reload anymore.

Reproduction

can't be done in vite.new

Steps to reproduce

See description.

System Info

needed?

Used Package Manager

npm

Logs

No response

Validations

bluwy commented 1 week ago

Is it fixed with the Vite 6 beta? We recently merged a refactor that should likely not cause this behaviour anymore.