Files
Atomcms-edit/resources/themes/atom/vite.config.js
T
2026-05-09 17:32:17 +02:00

44 lines
966 B
JavaScript
Executable File

import { defineConfig } from "vite";
import laravel from "laravel-vite-plugin";
import path from "path";
import { fileURLToPath } from "url";
import tailwindcss from "@tailwindcss/postcss";
import autoprefixer from "autoprefixer";
const __dirname = path.dirname(fileURLToPath(import.meta.url));
export default defineConfig({
plugins: [
laravel({
input: [
path.resolve(__dirname, "css/app.css"),
path.resolve(__dirname, "js/app.js"),
"resources/js/global.js",
"resources/css/global.css",
],
}),
{
name: "blade",
handleHotUpdate({ file, server }) {
if (file.endsWith(".blade.php")) {
server.ws.send({
type: "full-reload",
path: "*",
});
}
},
},
],
resolve: {
alias: {
"@": path.resolve(__dirname, "js/app.js"),
},
},
css: {
postcss: {
plugins: [tailwindcss(), autoprefixer()],
},
},
});