coolify/vite.config.js

30 lines
855 B
JavaScript
Raw Normal View History

2023-03-17 15:33:48 +01:00
import { defineConfig } from "vite";
import laravel from "laravel-vite-plugin";
export default defineConfig({
server: {
host: "0.0.0.0",
hmr: process.env.GITPOD_WORKSPACE_URL
? {
2023-05-05 17:56:03 +02:00
// Due to port forwarding, we have to replace
2023-03-17 15:33:48 +01:00
// 'https' with the forwarded port, as this
2023-05-05 17:56:03 +02:00
// is the URI created by GitPod.
2023-03-17 15:33:48 +01:00
host: process.env.GITPOD_WORKSPACE_URL.replace(
"https://",
"5173-"
),
protocol: "wss",
clientPort: 443,
}
: {
host: "localhost",
},
},
plugins: [
laravel({
input: ["resources/css/app.css", "resources/js/app.js"],
refresh: true,
}),
],
});