-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.organisation.config.js
62 lines (58 loc) · 2.16 KB
/
vite.organisation.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
/*
* Author: Raul Perusquia <raul@inikoo.com>
* Created: Mon, 04 Sep 2023 12:16:07 Malaysia Time, Kuala Lumpur, Malaysia
* Copyright (c) 2023, Raul A Perusquia Flores
*/
import {sentryVitePlugin} from '@sentry/vite-plugin';
import {defineConfig, loadEnv} from 'vite';
import laravel from 'laravel-vite-plugin';
import vue from '@vitejs/plugin-vue';
import i18n from 'laravel-vue-i18n/vite';
import inertia from './resources/scripts/vite/inertia-layout';
import {fileURLToPath, URL} from 'node:url';
export default ({ mode }) => {
process.env = {...process.env, ...loadEnv(mode, process.cwd())};
return defineConfig(
{
plugins: [
inertia(),
laravel({
hotFile : 'public/organisation.hot',
buildDirectory: 'organisation',
input : 'resources/js/app-organisation.js',
ssr : 'resources/js/ssr-organisation.js',
refresh : true,
}),
vue({
template: {
transformAssetUrls: {
base : null,
includeAbsolute: false,
},
},
}),
i18n(),
process.env.VITE_DEPLOY_SOURCES_SENTRY_TOKEN??false ? sentryVitePlugin({
org : 'inikoo-ltd',
project: 'wowsbar-vue',
authToken: process.env.VITE_DEPLOY_SOURCES_SENTRY_TOKEN,
}) : null
],
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)),
},
},
build: {
sourcemap: true,
},
}
);
}