55
loading...
This website collects cookies to deliver better user experience
curl -s https://laravel.build/<name-of-your-app> | bash
./vendor/bin/sail up
later composer-docker up
is enoughnpm install
npm run install
npx tsc --init
{
"compilerOptions": {
"target": "es5",
"module": "es2020",
"moduleResolution": "node",
"baseUrl": "./",
"strict": true, // Enable strict type-checking options
"skipLibCheck": true, // Skip type checking of declaration files
"noImplicitAny": false // Bypass raising errors on
anytype
},
"include": ["resources/js/**/*"] // Frontend paths pattern
}
Install the dependencies
npm install ts-loader typescript --save-dev
composer require laravel/breeze --dev
php artisan breeze:install react
Configure Laravel Mix
Initial Laravel installation comes with a boilerplate JavaScript entry point, which needs to get converted into TypeScript. All you need is to rename .js to .ts.
-resources/js/app.js
+resources/js/app.tsx
.ts
and .tsx
as a resolvable extension.