You've already forked Atomcms-edit
943d5bfc38
- 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
54 lines
1.1 KiB
JavaScript
Executable File
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",
|
|
},
|
|
});
|