Free, open-source screen sharing for private live streams with friends. Watch together in a browser or self-host Piik. 免费开源的私密屏幕共享,支持游戏直播、一起看电影与自部署。
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
// The Go server owns /api, /healthz and /signal; everything else (including
// /r/<roomId> invitation paths) is the SPA that Vite already serves. Keeping the
// Browser origin on 8787 leaves PUBLIC_BASE_URL, ALLOWED_ORIGINS, the README and
// the LAN-phone instructions unchanged; the Go dev server moves to 8788.
const server = "http://127.0.0.1:8788";
export default defineConfig({
plugins: [react()],
// Local build output includes Browser profiles, not application entries.
optimizeDeps: { entries: ["index.html", "site/**/*.html"] },
build: {
outDir: "internal/server/webassets/dist",
emptyOutDir: false,
},
server: {
// host: true keeps the documented LAN-phone workflow reachable.
host: true,
port: 8787,
strictPort: true,
// Packaging and the embedded Go bundle are outputs, not live UI sources.
watch: { ignored: ["**/build/**", "**/internal/server/webassets/dist/**"] },
proxy: {
"/api": { target: server },
"/healthz": { target: server },
"/signal": { target: server, ws: true },
},
},
});