编程

Laravel Breeze添加TypeScript支持

458 2023-03-24 16:43:00

Laravel 团队添加了可选的 TypeScript 支持到 Laravel Breeze 。

This week we shipped TypeScript support for our Inertia powered React and Vue stacks on Laravel Breeze.

It’s the fastest way to pair a modern TypeScript frontend with the most productive full-stack framework on the planet. ❤️ https://t.co/H3PDXlQV1v

— Taylor Otwell 🪐 (@taylorotwell) March 22, 2023

你可以使用最新版 Brezee,运行 breeze:install  在交互式命令中配置 typescript。

 

你也可以使用 --typescript 标志跳过该提示,如下:

php artisan breeze:install vue --typescript
 
# Other options like SSR
php artisan breeze:install vue \
  --typescript \
  --ssr \
  --pest \
  --dark

同时,感谢 Jess Archer, 添加了这一 Typescript 支持到 Breeze 包中。