-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.js
31 lines (30 loc) · 1.04 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
import { defineConfig } from 'vite';
import laravel, { refreshPaths } from 'laravel-vite-plugin';
export default defineConfig({
plugins: [
laravel({
input: ['resources/css/app.css', 'resources/js/app.js'],
refresh: [
...refreshPaths,
'app/Livewire/**',
],
}),
],
// https://github.com/mandrasch/ddev-laravel-vite
server: {
// respond to all network requests (same as '0.0.0.0')
host: true,
// we need a strict port to match on PHP side
strictPort: true,
port: 5173,
hmr: {
// TODO: Is this the best way to achieve that? 🤔
// Force the Vite client to connect via SSL
// This will also force a "https://" URL in the public/hot file
protocol: 'wss',
// The host where the Vite dev server can be accessed
// This will also force this host to be written to the public/hot file
host: `${process.env.DDEV_HOSTNAME}`
}
}
});