Files
Epicnabbo-Catalogus-Updated…/Updated_Cms/resources/themes/atom/vite.config.js
T
2026-01-07 19:32:43 +01:00

59 lines
1.6 KiB
JavaScript

import { defineConfig } from "vite";
import laravel from "laravel-vite-plugin";
import path from "path";
import tailwindcss from "tailwindcss";
import postcssImport from "postcss-import";
import postcssNesting from "postcss-nesting";
import tailwindcssNesting from "tailwindcss/nesting";
import autoprefixer from "autoprefixer";
export default defineConfig({
plugins: [
laravel({
input: [
path.resolve(__dirname, "css/app.scss"),
path.resolve(__dirname, "js/app.js"),
"resources/js/global.js",
"resources/css/global.scss",
],
}),
{
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: [
postcssImport(),
tailwindcssNesting(postcssNesting()),
tailwindcss({
config: path.resolve(__dirname, "tailwind.config.js"),
}),
autoprefixer(),
],
},
},
build: {
rollupOptions: {
onwarn(warning, warn) {
// Negeer INVALID_ANNOTATION warnings van flowbite
if (warning.code === 'INVALID_ANNOTATION') return;
warn(warning);
}
}
},
});