-
-
Notifications
You must be signed in to change notification settings - Fork 24
/
vite.config.js
31 lines (31 loc) · 953 Bytes
/
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
import react from '@vitejs/plugin-react';
import laravel from 'laravel-vite-plugin';
import { resolve } from 'path';
import { defineConfig } from 'vite';
import { watch } from 'vite-plugin-watch';
export default defineConfig({
plugins: [
laravel({
input: 'resources/js/app.tsx',
ssr: 'resources/js/ssr.tsx',
refresh: true
}),
react(),
watch({
pattern: 'app/{Data,Enums}/**/*.php',
command: 'php artisan typescript:transform'
}),
watch({
pattern: 'routes/web.php',
command: 'php artisan ziggy:generate'
})
],
resolve: {
alias: {
ui: resolve('resources/js/components/ui/index.ts'),
layouts: resolve('resources/js/layouts/index.ts'),
components: resolve('resources/js/components'),
'ziggy-js': resolve('vendor/tightenco/ziggy')
}
}
});