-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathvite.config.js
More file actions
48 lines (46 loc) · 1.22 KB
/
vite.config.js
File metadata and controls
48 lines (46 loc) · 1.22 KB
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 { quasar, transformAssetUrls } from '@quasar/vite-plugin'
import vue from '@vitejs/plugin-vue'
import laravel from 'laravel-vite-plugin'
import path from 'path'
import VueMacros from 'unplugin-vue-macros/vite'
import { defineConfig } from 'vite'
const domain = process.env.APP_URL ? process.env.APP_URL.replace(/https?:\/\//gi, '') : undefined
export default defineConfig({
server: {
port: 5174,
hmr: {
host: domain || 'localhost',
},
watch: {
ignored: ['**/storage/app/**'],
},
https: {
key: domain ? path.resolve(__dirname, `./docker/develop/certs/${domain}.key`) : undefined,
cert: domain ? path.resolve(__dirname, `./docker/develop/certs/${domain}.crt`) : undefined,
},
},
build: {
sourcemap: true,
},
plugins: [
laravel({
input: ['resources/js/app.js'],
refresh: true,
}),
VueMacros({
plugins: {
vue: vue(),
},
template: { transformAssetUrls },
}),
quasar({
sassVariables: path.resolve(__dirname, './resources/css/quasar-variables.scss'),
}),
],
resolve: {
alias: {
'@img': path.resolve(__dirname, './resources/img'),
'@': path.resolve(__dirname, './resources/js'),
},
},
})