Mercurial > borealpoint
diff vite.config.js @ 0:9d7dcd54c677
Initial Commit and package setup
| author | luka |
|---|---|
| date | Sat, 23 Aug 2025 22:20:51 -0400 |
| parents | |
| children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vite.config.js Sat Aug 23 22:20:51 2025 -0400 @@ -0,0 +1,50 @@ +import { defineConfig } from "vite"; +import laravel from "laravel-vite-plugin"; +import prism from 'vite-plugin-prismjs'; +import fs from "fs"; +import path from "path"; + +const pagesDir = "resources/js/pages"; +let pageScripts = []; + +if (fs.existsSync(pagesDir)) { + pageScripts = fs + .readdirSync(pagesDir) + .map((file) => path.join(pagesDir, file)); +} + +export default defineConfig({ + // Optional: Silence Sass deprecation warnings. See note below. + css: { + preprocessorOptions: { + scss: { + silenceDeprecations: [ + 'import', + 'mixed-decls', + 'color-functions', + 'global-builtin', + ], + }, + }, + }, + plugins: [ + laravel({ + input: [ + "resources/css/app.css", + "resources/js/app.js", + "resources/js/easymde.js", + "resources/js/prismjs.js", + "resources/js/ServerTable.js", + "resources/sass/app.scss", + ...pageScripts, + ], + refresh: true, + }), + prism({ + languages: ["javascript", "css", "html", "typescript", "php", "sql", "bash", "sh"], + plugins: ["line-numbers"], + theme: "tomorrow", + css: true, + }), + ], +});
