vite.config.js 786 B

1234567891011121314151617181920212223242526272829
  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: ["themes/default/sass/app.scss", "themes/default/js/app.js"],
  8. buildDirectory: "build",
  9. }),
  10. {
  11. name: "blade",
  12. handleHotUpdate({ file, server }) {
  13. if (file.endsWith(".blade.php")) {
  14. server.ws.send({
  15. type: "full-reload",
  16. path: "*",
  17. });
  18. }
  19. },
  20. },
  21. ],
  22. resolve: {
  23. alias: {
  24. "@": "/themes/default/js",
  25. "~bootstrap": path.resolve("node_modules/bootstrap"),
  26. },
  27. },
  28. });