ctrlpanel/themes/default/vite.config.js

38 lines
856 B
JavaScript
Raw Normal View History

2023-01-30 08:43:13 +00:00
import { defineConfig } from "vite";
import laravel from "laravel-vite-plugin";
import path from "path";
2023-01-30 08:43:13 +00:00
export default defineConfig({
plugins: [
laravel({
input: [
"themes/default/sass/app.scss",
"themes/default/js/app.js"
],
2023-01-30 08:43:13 +00:00
buildDirectory: "build",
}),
2023-01-30 08:43:13 +00:00
{
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'),
}
2023-01-30 08:43:13 +00:00
},
2023-01-30 08:43:13 +00:00
});