annotate publishable/vite.config.js @ 3:e107504fa22c

New assets related to BS5
author luka
date Mon, 23 Jun 2025 20:20:31 -0400
parents b44434aaa767
children 84c75d9d90be
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";
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
8 const pageScripts = fs
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
9 .readdirSync(pagesDir)
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
10 .map((file) => path.join(pagesDir, file));
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
11
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
12 export default defineConfig({
3
e107504fa22c New assets related to BS5
luka
parents: 2
diff changeset
13 // Optional: Silence Sass deprecation warnings. See note below.
e107504fa22c New assets related to BS5
luka
parents: 2
diff changeset
14 css: {
e107504fa22c New assets related to BS5
luka
parents: 2
diff changeset
15 preprocessorOptions: {
e107504fa22c New assets related to BS5
luka
parents: 2
diff changeset
16 scss: {
e107504fa22c New assets related to BS5
luka
parents: 2
diff changeset
17 silenceDeprecations: [
e107504fa22c New assets related to BS5
luka
parents: 2
diff changeset
18 'import',
e107504fa22c New assets related to BS5
luka
parents: 2
diff changeset
19 'mixed-decls',
e107504fa22c New assets related to BS5
luka
parents: 2
diff changeset
20 'color-functions',
e107504fa22c New assets related to BS5
luka
parents: 2
diff changeset
21 'global-builtin',
e107504fa22c New assets related to BS5
luka
parents: 2
diff changeset
22 ],
e107504fa22c New assets related to BS5
luka
parents: 2
diff changeset
23 },
e107504fa22c New assets related to BS5
luka
parents: 2
diff changeset
24 },
e107504fa22c New assets related to BS5
luka
parents: 2
diff changeset
25 },
2
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
26 plugins: [
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
27 laravel({
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
28 input: [
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
29 "resources/css/app.css",
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
30 "resources/js/app.js",
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
31 "resources/js/easymde.js",
3
e107504fa22c New assets related to BS5
luka
parents: 2
diff changeset
32 "resources/js/prismjs.js",
2
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
33 ...pageScripts,
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
34 ],
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
35 refresh: true,
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
36 }),
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
37 prism({
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
38 languages: ["javascript", "css", "html", "typescript", "php", "sql", "bash", "sh"],
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
39 plugins: ["line-numbers"],
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
40 theme: "tomorrow",
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
41 css: true,
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
42 }),
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
43 ],
b44434aaa767 Moving around the components.
luka
parents:
diff changeset
44 });