vite.config.js 858 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import { defineConfig } from "vite";
  2. import laravel from "laravel-vite-plugin";
  3. import path from "path";
  4. export default defineConfig({
  5. plugins: [
  6. laravel({
  7. input: [
  8. "themes/default/sass/app.scss",
  9. "themes/default/js/app.js"
  10. ],
  11. buildDirectory: "default",
  12. }),
  13. {
  14. name: "blade",
  15. handleHotUpdate({ file, server }) {
  16. if (file.endsWith(".blade.php")) {
  17. server.ws.send({
  18. type: "full-reload",
  19. path: "*",
  20. });
  21. }
  22. },
  23. },
  24. ],
  25. resolve: {
  26. alias: {
  27. '@': '/themes/default/js',
  28. '~bootstrap': path.resolve('node_modules/bootstrap'),
  29. }
  30. },
  31. });