-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.js
56 lines (53 loc) · 1.44 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
47
48
49
50
51
52
53
54
55
56
import { defineConfig } from 'vite';
import fs from 'fs';
import laravel from 'laravel-vite-plugin';
import dotenv from 'dotenv';
import path from 'path';
import {viteStaticCopy} from "vite-plugin-static-copy";
dotenv.config() // load env vars from .env
// const host = `${process.env.VITE_API_URL ?? 'http://localhost:3000'}`;
// const port = `${process.env.VITE_PORT ?? '3000'}`;
console.log('Start vite!!!')
// console.log(`Vite server running on ${host}:${port}`);
export default defineConfig({
plugins: [
laravel({
input: [
'resources/sass/app.scss',
'resources/js/app.js'
],
refresh: true,
}),
viteStaticCopy({
targets: [
{
src: 'node_modules/circle-flags/flags/',
dest: 'images'
}
]
})
],
resolve: {
alias: {
'~bootstrap': path.resolve(__dirname, 'node_modules/bootstrap'),
}
},
// server: {
// port: 8080,
// hmr: {
// host: 'localhost',
// },
// },
server: {
https: {
key: fs.readFileSync('docker/certificates/docker.dev.key'),
cert: fs.readFileSync('docker/certificates/docker.dev.crt'),
},
host: true,
port: 7050,
hmr: {
host: 'openshift.docker.dev',
protocol: 'wss'
},
},
});