Files
root 943d5bfc38 feat: install and configure Inertia.js with React
- Install inertia-laravel, @inertiajs/react, react, @vitejs/plugin-react
- Add HandleInertiaRequests middleware registered in web group
- Create Inertia root template (resources/views/app.blade.php)
- Add React entry point and page components (resources/js/)
- Add Inertia demo route (/inertia-test)
- HomeController reverted to Blade (index page stays original)
- Remove inertia-test2 test route
2026-05-25 15:15:14 +02:00

54 lines
1.1 KiB
JavaScript
Executable File

import { defineConfig } from "vite";
import laravel from "laravel-vite-plugin";
import react from "@vitejs/plugin-react";
import path from "path";
import tailwindcss from "@tailwindcss/postcss";
import autoprefixer from "autoprefixer";
export default defineConfig({
plugins: [
laravel({
input: [
"resources/css/global.css",
"resources/js/global.js",
"resources/js/ssr.jsx",
"resources/themes/atom/css/app.css",
"resources/themes/atom/js/app.js",
"resources/themes/dusk/css/app.css",
"resources/themes/dusk/js/app.js",
],
}),
react(),
{
name: "blade",
handleHotUpdate({ file, server }) {
if (file.endsWith(".blade.php")) {
server.ws.send({
type: "full-reload",
path: "*",
});
}
},
},
],
resolve: {
alias: {
"@": "/resources/js",
},
},
css: {
postcss: {
plugins: [tailwindcss(), autoprefixer()],
},
transformer: "postcss",
minify: false,
},
build: {
cssMinify: "esbuild",
minify: "esbuild",
target: "esnext",
},
});