Mercurial > borealpoint
comparison vite.config.js @ 0:9d7dcd54c677
Initial Commit and package setup
| author | luka |
|---|---|
| date | Sat, 23 Aug 2025 22:20:51 -0400 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:9d7dcd54c677 |
|---|---|
| 1 import { defineConfig } from "vite"; | |
| 2 import laravel from "laravel-vite-plugin"; | |
| 3 import prism from 'vite-plugin-prismjs'; | |
| 4 import fs from "fs"; | |
| 5 import path from "path"; | |
| 6 | |
| 7 const pagesDir = "resources/js/pages"; | |
| 8 let pageScripts = []; | |
| 9 | |
| 10 if (fs.existsSync(pagesDir)) { | |
| 11 pageScripts = fs | |
| 12 .readdirSync(pagesDir) | |
| 13 .map((file) => path.join(pagesDir, file)); | |
| 14 } | |
| 15 | |
| 16 export default defineConfig({ | |
| 17 // Optional: Silence Sass deprecation warnings. See note below. | |
| 18 css: { | |
| 19 preprocessorOptions: { | |
| 20 scss: { | |
| 21 silenceDeprecations: [ | |
| 22 'import', | |
| 23 'mixed-decls', | |
| 24 'color-functions', | |
| 25 'global-builtin', | |
| 26 ], | |
| 27 }, | |
| 28 }, | |
| 29 }, | |
| 30 plugins: [ | |
| 31 laravel({ | |
| 32 input: [ | |
| 33 "resources/css/app.css", | |
| 34 "resources/js/app.js", | |
| 35 "resources/js/easymde.js", | |
| 36 "resources/js/prismjs.js", | |
| 37 "resources/js/ServerTable.js", | |
| 38 "resources/sass/app.scss", | |
| 39 ...pageScripts, | |
| 40 ], | |
| 41 refresh: true, | |
| 42 }), | |
| 43 prism({ | |
| 44 languages: ["javascript", "css", "html", "typescript", "php", "sql", "bash", "sh"], | |
| 45 plugins: ["line-numbers"], | |
| 46 theme: "tomorrow", | |
| 47 css: true, | |
| 48 }), | |
| 49 ], | |
| 50 }); |
