|
2
|
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 const pageScripts = fs
|
|
|
9 .readdirSync(pagesDir)
|
|
|
10 .map((file) => path.join(pagesDir, file));
|
|
|
11
|
|
|
12 export default defineConfig({
|
|
|
13 plugins: [
|
|
|
14 laravel({
|
|
|
15 input: [
|
|
|
16 "resources/css/app.css",
|
|
|
17 "resources/js/app.js",
|
|
|
18 "resources/js/easymde.js",
|
|
|
19 ...pageScripts,
|
|
|
20 ],
|
|
|
21 refresh: true,
|
|
|
22 }),
|
|
|
23 prism({
|
|
|
24 languages: ["javascript", "css", "html", "typescript", "php", "sql", "bash", "sh"],
|
|
|
25 plugins: ["line-numbers"],
|
|
|
26 theme: "tomorrow",
|
|
|
27 css: true,
|
|
|
28 }),
|
|
|
29 ],
|
|
|
30 });
|