3 ms·
Sounds like you are talking about frontend development. In that case you are trading off speed for accuracy. Some dev server tooling has this issue. Most syste
by rezonant 3y ago
Sounds like you are talking about frontend development. In that case you are trading off speed for accuracy. Some dev server tooling has this issue.
Most systems built on Vite though do check across files, so likely that's just a bug in the build system you were using. A bug that is likely fixed.
One thing you can be assured of is that when you actually build your app (hopefully using CI), it will find those problems, because you are not relying on hot reloading to do it.
On the backend side it's far less common to use a build server model, and personally not very warranted -- building a frontend app can take a lot of time and the feedback cycle needs to be short for a dev to be effective. On the backend, a small amount of time rebuilding the app before it is rerun is not nearly as costly. If your Typescript codebase is so large that the feedback cycle of rebuilding is too long, well you have to take the tradeoff, but it's a rare problem.
Understand that the only way a "dev server" style backend build process is saving you time is by not checking the types during recompilation. It wouldn't be surprising that it would miss typing changes.
- grujicd 3y agoYes it's for the frontend, but it's not really related to hot reload thing. Is there a way to really compile tsx? I couldn't find any, tsc doesn't support it so you have to use some of the transpilers, and they don't perform full type check across files. So there's no way to perform real "full build" when tsx files are used, even if you don't care about build duration. If there is, I would love to hear about it.
- deleted 3y ago[deleted]