49 lines
1.1 KiB
JavaScript
49 lines
1.1 KiB
JavaScript
import { defineConfig } from "vite";
|
|
import tailwindcss from "@tailwindcss/vite";
|
|
import hotReloadPlugin from "./dev-server";
|
|
|
|
let watchedFiles = [
|
|
"./site/**/*.blade.php",
|
|
"./site/**/*.md",
|
|
"./site/**/*.html",
|
|
"./config/**/*.php"
|
|
];
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
tailwindcss({
|
|
root: "./site",
|
|
content: watchedFiles
|
|
}),
|
|
hotReloadPlugin()
|
|
],
|
|
|
|
server: {
|
|
host: "zap.test",
|
|
cors: true
|
|
},
|
|
|
|
publicDir: false,
|
|
build: {
|
|
// Where Vite outputs the built files
|
|
outDir: 'build_local/assets',
|
|
|
|
rollupOptions: {
|
|
input: {
|
|
// Your CSS entry point
|
|
main: 'site/assets/main.css'
|
|
// You can add JS files too:
|
|
// app: './resources/js/app.js'
|
|
},
|
|
|
|
output: {
|
|
// Keep CSS and JS separate
|
|
assetFileNames: '[name].[hash].[ext]',
|
|
entryFileNames: '[name].[hash].js'
|
|
}
|
|
},
|
|
|
|
// Generate manifest for production
|
|
manifest: true
|
|
},
|
|
}) |