Get your questions in, in Slido, and we can start with the first one. Can you do SSG or static site generation with Start? Yes. Yes. Yes you can. Yes. Yes. Cool. How would we integrate type safety logic into a mono repo? I'm not going to lie, the mono repo stuff is difficult. We have people who are building mono repo projects that are really large, and for the most part, it's not a big problem unless you're splitting your front end, like your routes, into multiple packages. If you're doing that, not only you're going to have a hard time doing that with most routers anyway, but especially with the type safety, the way that the type safety works, there's some tricks and hacks that we're working on to make that easier, because the way that the types work is they're kind of omnipresent across your whole project. Packages, if they have separate TS configs, it's difficult to isolate the router types to specific packages. We're working on it, and it's really not that big of a deal. Actually, the person who has been experiencing it the most is Dominik Dorfmeister, TK Dodo, who works at Sentry. He's been using TanStack Router a lot, and he has mono repo ideas for how to make that better. Nice. I heard Sentry's a great place to work. Yeah, I've heard of that.
How would I know? Alright, how does TanStack Start automatically add boilerplate code when you create a new file? TanStack Start is just a Vite plugin. I didn't show that part, but you can just add TanStack Start, the Vite plugin, to a Vite configuration, and that's all it is. At the end of the day, it's really just a request handler, and we use Vite to prep that request handler. Because we're already hooked into Vite, we can actually hook into the dev lifecycle, listen on the file system, and we can watch the files you're creating. When we find a new route that comes in that's blank, we just make some educated decisions for you and write the content, and write it out to disk. It's very performant, too. We can watch hundreds, maybe thousands of route files and keep them up-to-date. In fact, if you saw the path inside of the create file route command, you actually don't even need to manage that. If you change the name of your route or move it to a different path, we just update that path for you in the code. Which can be kind of surprising for some people at first. They're like, what the heck? Why did that string just update in my file? And we're like, oh, we got you. We're queuing on for you. Super useful.
Comments