Mercurial > packages > framework
comparison publishable/vite.config.js @ 4:84c75d9d90be
Changing usage to be bootstrap 5, not everything is reviewed but it's been started
| author | luka |
|---|---|
| date | Tue, 19 Aug 2025 20:33:35 -0400 |
| parents | e107504fa22c |
| children | f282c6ef1671 |
comparison
equal
deleted
inserted
replaced
| 3:e107504fa22c | 4:84c75d9d90be |
|---|---|
| 3 import prism from 'vite-plugin-prismjs'; | 3 import prism from 'vite-plugin-prismjs'; |
| 4 import fs from "fs"; | 4 import fs from "fs"; |
| 5 import path from "path"; | 5 import path from "path"; |
| 6 | 6 |
| 7 const pagesDir = "resources/js/pages"; | 7 const pagesDir = "resources/js/pages"; |
| 8 const pageScripts = fs | 8 let pageScripts = []; |
| 9 .readdirSync(pagesDir) | 9 |
| 10 .map((file) => path.join(pagesDir, file)); | 10 if (fs.existsSync(pagesDir)) { |
| 11 pageScripts = fs | |
| 12 .readdirSync(pagesDir) | |
| 13 .map((file) => path.join(pagesDir, file)); | |
| 14 } | |
| 11 | 15 |
| 12 export default defineConfig({ | 16 export default defineConfig({ |
| 13 // Optional: Silence Sass deprecation warnings. See note below. | 17 // Optional: Silence Sass deprecation warnings. See note below. |
| 14 css: { | 18 css: { |
| 15 preprocessorOptions: { | 19 preprocessorOptions: { |
| 28 input: [ | 32 input: [ |
| 29 "resources/css/app.css", | 33 "resources/css/app.css", |
| 30 "resources/js/app.js", | 34 "resources/js/app.js", |
| 31 "resources/js/easymde.js", | 35 "resources/js/easymde.js", |
| 32 "resources/js/prismjs.js", | 36 "resources/js/prismjs.js", |
| 37 "resources/sass/app.scss", | |
| 33 ...pageScripts, | 38 ...pageScripts, |
| 34 ], | 39 ], |
| 35 refresh: true, | 40 refresh: true, |
| 36 }), | 41 }), |
| 37 prism({ | 42 prism({ |
