// SPDX-License-Identifier: AGPL-3.0-or-later import tailwindcss from "@tailwindcss/vite"; import vue from "@vitejs/plugin-vue"; import { defineConfig } from "vitest/config"; // The config runs in Node, but this tsconfig has no Node types. declare const process: { env: Record }; const api = process.env.DOCWELL_DEV_API ?? "http://localhost:8080"; export default defineConfig({ plugins: [vue(), tailwindcss()], build: { // Embedded into the docwell-web Go binary. outDir: "../internal/spa/dist", emptyOutDir: true, }, server: { port: 5173, // DOCWELL_DEV_API points the dev proxy at another docwell-server. proxy: { "/api": api, "/collab": { target: api.replace(/^http/, "ws"), ws: true }, }, }, test: { environment: "jsdom", }, });