-
Notifications
You must be signed in to change notification settings - Fork 2
/
vite.iris.config.js
84 lines (82 loc) · 2.92 KB
/
vite.iris.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
82
83
84
/*
* Author: Raul Perusquia <[email protected]>
* Created: Tue, 12 Sep 2023 20:46:11 Malaysia Time, Sanur, Bali, Indonesia
* Copyright (c) 2023, 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 {codecovVitePlugin} from "@codecov/vite-plugin";
import path from "node:path"
export default defineConfig(
{
plugins: [
laravel({
hotFile : "public/iris.hot",
buildDirectory: "iris",
input : "resources/js/app-iris.js",
ssr : "resources/js/ssr-iris.js",
refresh : true
}),
vue({
template: {
transformAssetUrls: {
base : null,
includeAbsolute: false
}
}
}),
i18n(),
codecovVitePlugin({
enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,
bundleName: "iris",
uploadToken: process.env.CODECOV_TOKEN,
})
],
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'],
}
}
}
});