-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvite.config.js
More file actions
executable file
·80 lines (78 loc) · 2.29 KB
/
Copy pathvite.config.js
File metadata and controls
executable file
·80 lines (78 loc) · 2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import laravel from "laravel-vite-plugin";
import { defineConfig } from "vite";
import * as path from "path";
import vue from "@vitejs/plugin-vue2";
import { dashboardChosenColor } from "./Modules/Dashboard/Resources/assets/js/colors.js";
import postcssRtl from "postcss-rtl";
const projectRootDir = path.resolve(__dirname);
export default defineConfig({
plugins: [
laravel([
"Modules/Dashboard/Resources/assets/js/qovex/qovex.js",
"Modules/Dashboard/Resources/assets/scss/qovex/qovex.scss",
"Modules/Dashboard/Resources/assets/js/dason/dason.js",
"Modules/Dashboard/Resources/assets/scss/dason/dason.scss",
]),
vue({
template: {
transformAssetUrls: {
base: null,
includeAbsolute: false,
},
},
}),
{
name: "blade",
handleHotUpdate({ file, server }) {
if (file.endsWith(".blade.php")) {
server.ws.send({
type: "full-reload",
path: "*",
});
}
},
},
],
resolve: {
alias: {
"~bootstrap": path.resolve(__dirname, "node_modules/bootstrap4"),
"~bootstrap5": path.resolve(__dirname, "node_modules/bootstrap5"),
"~fortawesome": path.resolve(
__dirname,
"node_modules/@fortawesome/fontawesome-free"
),
"~select2": path.resolve(__dirname, "node_modules/select2"),
"~bootstrap-select": path.resolve(
__dirname,
"node_modules/bootstrap-select"
),
"~summernote": path.resolve(__dirname, "node_modules/summernote"),
"~glightbox": path.resolve(__dirname, "node_modules/glightbox"),
"~simonwep": path.resolve(__dirname, "node_modules/@simonwep/pickr"),
"~swiper": path.resolve(__dirname, "node_modules/swiper"),
"~bootstrap-colorpicker": path.resolve(
__dirname,
"node_modules/bootstrap-colorpicker"
),
vue: "vue/dist/vue.esm.js",
$fonts: path.resolve(
projectRootDir,
"Modules/Dashboard/Resources/assets/fonts"
),
},
},
css: {
preprocessorOptions: {
scss: {
additionalData: `$dashboardChosenColor: ${dashboardChosenColor};`,
},
},
postcss: {
plugins: [postcssRtl()],
},
},
define: {
"process.env": process.env,
},
build: { chunkSizeWarningLimit: 1600 },
});