laravel / jetstream

Tailwind scaffolding for the Laravel framework.

Home Page:https://jetstream.laravel.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Enabling TypeScript Compatibility in Jetstream

ljsharp opened this issue · comments

Adding TypeScript to my Jetstream Laravel project by hand takes up a ton of time. I've read some guides on how to do it, but when I try to make it ready for production, I keep running into errors. It'd be fantastic if TypeScript were included, or at least an option, when starting a new project, similar to how Laravel Breeze does it. Thanks!

We currently have no plans for typescript in Jetstream sorry.

Alright I hear. Thanks

Adding TypeScript to my Jetstream Laravel project by hand takes up a ton of time. I've read some guides on how to do it, but when I try to make it ready for production, I keep running into errors. It'd be fantastic if TypeScript were included, or at least an option, when starting a new project, similar to how Laravel Breeze does it. Thanks!

I found it helpful, to create a sample breeze project with typescript and vue, and then taking this as a template. this is very easy. Because you can just copy paste things like types etc, or the typescript config.

After scaffolding a few Jetstream projects and adding TS, I think it would be nice if this process could eventually be an additional flag when installing the inertia option. I'm working on a fork to add this, though I'm not sure if this needs to be officially sponsored by a Laravel team member. Could this possibility be community driven @driesvints?

There's still some cleanup work to do on that fork though everything works out-of-box with the additional --typescript flag. A lot of the original Vue components look like they're Vue 2 hold overs so most of the work is getting those updated and bolting on the TS support. It would be nice to eventually get this in Jetstream, though, so we don't have to manually do this by hand when spinning a new project every time.

Heya @JoeyMckenzie. Jetstream is fully open source so feel free to publish a Typescript fork!