-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
vite.config.js
48 lines (46 loc) · 1.45 KB
/
vite.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
import { defineConfig, loadEnv } from 'vite';
import laravel from 'laravel-vite-plugin';
import vue from '@vitejs/plugin-vue';
import manifestSRI from 'vite-plugin-manifest-sri';
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons';
import path from 'path';
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, import.meta.dirname);
return {
plugins: [
laravel({
refresh: true,
detectTls: env.VITE_DETECT_TLS || null,
input: [
'resources/css/admin.css',
'resources/js/admin.js',
'resources/css/public.css',
'resources/js/public.js',
],
}),
manifestSRI(),
vue({
template: {
transformAssetUrls: {
base: null,
includeAbsolute: false,
},
},
}),
createSvgIconsPlugin({
iconDirs: [
path.resolve(process.cwd(), 'node_modules/remixicon/icons'),
path.resolve(process.cwd(), 'resources/svg'),
],
symbolId: 'icon-[name]',
}),
],
resolve: {
alias: {
'@': '/resources/js',
'~': '/resources',
'%': '/lang',
},
}
};
});