-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.js
executable file
·46 lines (45 loc) · 1.6 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
import { fileURLToPath, URL } from 'node:url';
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import million from 'million/compiler';
import vue from '@vitejs/plugin-vue';
export default defineConfig({
plugins: [
laravel({
input: ['resources/css/app.scss', 'resources/js/app.ts'],
refresh: true,
}),
{
name: 'php',
handleHotUpdate({ file, server }) {
if (file.endsWith('.php')) {
server.ws.send({
type: 'full-reload',
path: '*',
});
}
},
},
million.vite({ auto: true }),
vue({
template: {
transformAssetUrls: {
base: null,
includeAbsolute: false,
},
},
}),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./resources', import.meta.url)),
'@js': fileURLToPath(new URL('./resources/js', import.meta.url)),
'@css': fileURLToPath(new URL('./resources/css', import.meta.url)),
'@images': fileURLToPath(new URL('./resources/images', import.meta.url)),
'@node_modules': fileURLToPath(new URL('./node_modules', import.meta.url)),
'@src': fileURLToPath(new URL('./resources/src', import.meta.url)),
'@svg': fileURLToPath(new URL('./resources/svg', import.meta.url)),
'@views': fileURLToPath(new URL('./resources/views', import.meta.url))
},
}
});