-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvite.aiku-public.config.js
81 lines (79 loc) · 2.24 KB
/
vite.aiku-public.config.js
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
81
/*
* Author: Raul Perusquia <raul@inikoo.com>
* Created: Sun, 04 Feb 2024 09:06:02 Malaysia Time, Kuala Lumpur, Malaysia
* Copyright (c) 2024, Raul A Perusquia Flores
*/
import { defineConfig } from "vite";
import laravel from "laravel-vite-plugin";
import vue from "@vitejs/plugin-vue";
import i18n from "laravel-vue-i18n/vite";
import { fileURLToPath, URL } from "node:url";
import path from "node:path";
export default defineConfig(
{
server : {
cors: true
},
plugins: [
laravel({
hotFile : "public/aiku-public.hot",
buildDirectory: "aiku-public",
input : "resources/js/app-aiku-public.js",
ssr : "resources/js/ssr-aiku-public.js",
refresh : true
}),
vue({
template: {
transformAssetUrls: {
base : null,
includeAbsolute: false
}
}
}),
i18n()
],
ssr : {
noExternal: ["@inertiajs/server"]
},
resolve: {
alias: {
"@fad" : fileURLToPath(
new URL("./private/fa/pro-duotone-svg-icons",
import.meta.url)),
"@fal" : fileURLToPath(
new URL("./private/fa/pro-light-svg-icons",
import.meta.url)),
"@far" : fileURLToPath(
new URL("./private/fa/pro-regular-svg-icons",
import.meta.url)),
"@fas" : fileURLToPath(
new URL("./private/fa/pro-solid-svg-icons",
import.meta.url)),
"@fonts": path.resolve(__dirname, "./public/assets/Fonts/"),
"@art" : path.resolve(__dirname, "./public/art/")
}
},
build : {
sourcemap : true,
devSourcemap : true,
rollupOptions: {
output: {
manualChunks(id) {
if (id.includes("node_modules") &&
!id.includes("sentry")) {
return id.toString().
split("node_modules/")[1].split(
"/")[0].toString();
}
}
}
}
},
css : {
preprocessorOptions: {
scss: {
silenceDeprecations: ["legacy-js-api"]
}
}
}
});