forked from anonaddy/anonaddy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.mjs
57 lines (55 loc) · 1.42 KB
/
vite.config.mjs
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
import { defineConfig, loadEnv } from 'vite'
import laravel from 'laravel-vite-plugin'
import vue from '@vitejs/plugin-vue'
import fs from 'fs'
import { resolve } from 'path'
export default defineConfig(({ command, mode }) => {
const env = loadEnv(mode, process.cwd(), 'APP_URL')
const host = env.APP_URL.replace(/https?:\/\//, '')
return {
server: {
host: host,
hmr: {
host: host,
},
https: {
key:
process.env.NODE_ENV === 'production'
? null
: fs.readFileSync(`/home/vagrant/${host}.key`), // copy from /etc/ssl/certs in homestead so vagrant user has permissions
cert:
process.env.NODE_ENV === 'production'
? null
: fs.readFileSync(`/home/vagrant/${host}.crt`),
},
watch: {
usePolling: true,
ignored: ['**/vendor/**', '**/postfix/**', '**/storage/**'],
},
},
plugins: [
laravel({
input: [
'resources/css/app.css',
'resources/js/app.js',
'resources/js/webauthn/authenticate.js',
'resources/js/webauthn/register.js',
],
}),
vue({
template: {
transformAssetUrls: {
base: null,
includeAbsolute: false,
},
},
}),
],
base: '',
resolve: {
alias: {
'ziggy-js': resolve('vendor/tightenco/ziggy'),
},
},
}
})