-
Notifications
You must be signed in to change notification settings - Fork 5
/
vite.config.js
41 lines (37 loc) · 959 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
32
33
34
35
36
37
38
39
40
41
import legacy from '@vitejs/plugin-legacy'
import ViteRestart from 'vite-plugin-restart'
import basicSsl from '@vitejs/plugin-basic-ssl'
// https://vitejs.dev/config/
export default ({ command }) => ({
base: command === 'serve' ? '' : '/dist/',
build: {
emptyOutDir: true,
manifest: true,
outDir: './public/dist/',
rollupOptions: {
input: {
app: './resources/js/main.js',
},
},
},
plugins: [
// This plugin provides support for legacy browsers that do not support native ESM.
legacy({
targets: ['defaults', 'not IE 11'],
}),
// Plugin that add change listeners to restart the server
ViteRestart({
reload: ['./templates/**/*'],
}),
// Plugin that provides certificate support for vite https development services.
basicSsl(),
],
server: {
origin: 'https://localhost:3000',
port: 3000,
https: true,
hmr: {
host: 'localhost',
},
},
})