-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.herd.js
62 lines (61 loc) · 1.58 KB
/
vite.config.herd.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
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import path from 'path';
import browsersync from 'vite-plugin-browser-sync';
import laravel from 'laravel-vite-plugin';
import fs from 'fs';
const host = 'kayak-map.test';
export default defineConfig({
plugins: [
vue(),
laravel({
input: [
'resources/css/app.css',
'resources/js/app.js',
],
detectTls: host,
refresh: true,
}),
browsersync({
host: host,
port: 3000,
proxy: host,
https: true,
open: false
})
],
optimizeDeps: {
include: ['leaflet', 'vue-leaflet-markercluster']
},
resolve: {
alias: {
'@': path.resolve(__dirname, 'resources/js')
}
},
build: {
manifest: true,
outDir: 'public/build',
rollupOptions: {
input: 'resources/js/app.js'
}
},
server: {
host: host,
port: 5173,
hmr: { host },
https: {
key: fs.readFileSync(`C:\\Users\\User\\.config\\herd\\config\\valet\\Certificates\\${host}.key`),
cert: fs.readFileSync(`C:\\Users\\User\\.config\\herd\\config\\valet\\Certificates\\${host}.crt`),
},
headers: {
'Access-Control-Allow-Origin': '*',
},
proxy: {
'/api': {
target: host,
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '')
}
}
}
});