Open RintaroKinashi opened 10 months ago
docker-compose exec app php artisan breeze:install react --typescript
後に「src/resources/js/app.tsx
」のようなjsファイル下にtsファイルが入る構成になる
js→tsにリネームすると以下のエラーが発生する
vite v4.5.0 building for production...
✓ 25 modules transformed.
✓ built in 3.61s
[vite:load-fallback] Could not load /resources/js/Layouts/GuestLayout (imported by resources/ts/Pages/Auth/ForgotPassword.tsx): ENOENT: no such file or directory, open '/resources/js/Layouts/GuestLayout'
error during build:
Error: Could not load /resources/js/Layouts/GuestLayout (imported by resources/ts/Pages/Auth/ForgotPassword.tsx): ENOENT: no such file or directory, open '/resources/js/Layouts/GuestLayout'
src/resources/js/Pages/Auth/ForgotPassword.tsx
見ても/resources/js/Layouts/GuestLayout
をロードしてそうな場所パッと見ないんよな。。
tsにリネームせずにjsのままだとエラーなし
docker compose exec app npm run build
...
✓ built in 6.18s
run dev
を切ったらBreezeのログイン画面が現れる
参考
React.tsはBreezeを利用して入れていく