ctrlpanel/themes/default/vite.config.js
2023-01-30 09:43:13 +01:00

37 lines
856 B
JavaScript
Vendored

import { defineConfig } from "vite";
import laravel from "laravel-vite-plugin";
import path from "path";
export default defineConfig({
plugins: [
laravel({
input: [
"themes/default/sass/app.scss",
"themes/default/js/app.js"
],
buildDirectory: "build",
}),
{
name: "blade",
handleHotUpdate({ file, server }) {
if (file.endsWith(".blade.php")) {
server.ws.send({
type: "full-reload",
path: "*",
});
}
},
},
],
resolve: {
alias: {
'@': '/themes/default/js',
'~bootstrap': path.resolve('node_modules/bootstrap'),
}
},
});