annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
1 import { defineConfig } from "vite";
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
2 import laravel from "laravel-vite-plugin";
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
3 import prism from 'vite-plugin-prismjs';
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
4 import fs from "fs";
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
5 import path from "path";
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
6
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
7 const pagesDir = "resources/js/pages";
4
84c75d9d90be Changing usage to be bootstrap 5, not everything is reviewed but it's been started
luka
parents: 3
diff changeset
8 let pageScripts = [];
84c75d9d90be Changing usage to be bootstrap 5, not everything is reviewed but it's been started
luka
parents: 3
diff changeset
9
84c75d9d90be Changing usage to be bootstrap 5, not everything is reviewed but it's been started
luka
parents: 3
diff changeset
10 if (fs.existsSync(pagesDir)) {
84c75d9d90be Changing usage to be bootstrap 5, not everything is reviewed but it's been started
luka
parents: 3
diff changeset
11 pageScripts = fs
84c75d9d90be Changing usage to be bootstrap 5, not everything is reviewed but it's been started
luka
parents: 3
diff changeset
12 .readdirSync(pagesDir)
84c75d9d90be Changing usage to be bootstrap 5, not everything is reviewed but it's been started
luka
parents: 3
diff changeset
13 .map((file) => path.join(pagesDir, file));
84c75d9d90be Changing usage to be bootstrap 5, not everything is reviewed but it's been started
luka
parents: 3
diff changeset
14 }
2
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
15
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
16 export default defineConfig({
3
e107504fa22c New assets related to BS5
luka
parents: 2
diff changeset
17 // Optional: Silence Sass deprecation warnings. See note below.
e107504fa22c New assets related to BS5
luka
parents: 2
diff changeset
18 css: {
e107504fa22c New assets related to BS5
luka
parents: 2
diff changeset
19 preprocessorOptions: {
e107504fa22c New assets related to BS5
luka
parents: 2
diff changeset
20 scss: {
e107504fa22c New assets related to BS5
luka
parents: 2
diff changeset
21 silenceDeprecations: [
e107504fa22c New assets related to BS5
luka
parents: 2
diff changeset
22 'import',
e107504fa22c New assets related to BS5
luka
parents: 2
diff changeset
23 'mixed-decls',
e107504fa22c New assets related to BS5
luka
parents: 2
diff changeset
24 'color-functions',
e107504fa22c New assets related to BS5
luka
parents: 2
diff changeset
25 'global-builtin',
e107504fa22c New assets related to BS5
luka
parents: 2
diff changeset
26 ],
e107504fa22c New assets related to BS5
luka
parents: 2
diff changeset
27 },
e107504fa22c New assets related to BS5
luka
parents: 2
diff changeset
28 },
e107504fa22c New assets related to BS5
luka
parents: 2
diff changeset
29 },
2
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
30 plugins: [
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
31 laravel({
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
32 input: [
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
33 "resources/css/app.css",
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
34 "resources/js/app.js",
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
35 "resources/js/easymde.js",
3
e107504fa22c New assets related to BS5
luka
parents: 2
diff changeset
36 "resources/js/prismjs.js",
5
f282c6ef1671 better support for server side tables
luka
parents: 4
diff changeset
37 "resources/js/ServerTable.js",
4
84c75d9d90be Changing usage to be bootstrap 5, not everything is reviewed but it's been started
luka
parents: 3
diff changeset
38 "resources/sass/app.scss",
2
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
39 ...pageScripts,
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
40 ],
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
41 refresh: true,
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
42 }),
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
43 prism({
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
44 languages: ["javascript", "css", "html", "typescript", "php", "sql", "bash", "sh"],
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
45 plugins: ["line-numbers"],
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
46 theme: "tomorrow",
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
47 css: true,
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
48 }),
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
49 ],
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
50 });