VTRIL is a Vite Typescript React Inertia Laravel boilerplate.
The aim is to replace the default Laravel Mix which uses webpack with vite. Vite is very much faster than Laravel Mix as it bundles dependencies with esbuild.
This boilerplate uses Ziggy for frontend routing, utilises a custom Inertia Progress package - anubra266/vtril-progress, and the anubra266/react-errbo package to display errors.
-
Click Use this template at the top of the Repo
-
Clone your generated repo to your local system
-
Go to the project directory
cd my-project
- Install PHP Composer dependencies
composer install
- Create Environment config
cp .env.example .env
- Generate key
php artisan key:generate
- Install NPM dependencies
npm install
#or
yarn
- Start the bundle server
npm run dev
#or
yarn dev
- If you want typescript warnings in your terminal, use
npm run devt
#or
yarn devt
- Start the Laravel App
php artisan serve
npm run build
#or
yarn build