Mercurial > packages > framework
view publishable/vite.config.js @ 5:f282c6ef1671
better support for server side tables
| author | luka |
|---|---|
| date | Tue, 19 Aug 2025 22:15:16 -0400 |
| parents | 84c75d9d90be |
| children |
line wrap: on
line source
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, }), ], });
