The Vue dashboard now serves the binary, so archie.html, ui/src/archie and its client test go. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
30 lines
970 B
TypeScript
30 lines
970 B
TypeScript
import { defineConfig } from "vite";
|
|
import vue from "@vitejs/plugin-vue";
|
|
import tailwindcss from "@tailwindcss/vite";
|
|
import spotnote from "spotnote";
|
|
|
|
export default defineConfig({
|
|
plugins: [vue(), tailwindcss(), spotnote()],
|
|
resolve: {
|
|
alias: {
|
|
"@": new URL("./src", import.meta.url).pathname,
|
|
},
|
|
},
|
|
base: "/",
|
|
build: {
|
|
outDir: "dist",
|
|
emptyOutDir: true,
|
|
},
|
|
server: {
|
|
// Proxies the API to a locally running archie-ui (the process that serves
|
|
// the dashboard) so the frontend can be developed without rebuilding Go.
|
|
// changeOrigin stays false: archie-ui refuses a mutation whose Origin
|
|
// does not match its Host, and the browser's Origin is this dev server.
|
|
proxy: {
|
|
"/api": { target: "http://127.0.0.1:8484", changeOrigin: false },
|
|
"/health": { target: "http://127.0.0.1:8484", changeOrigin: false },
|
|
"/webhooks": { target: "http://127.0.0.1:8484", changeOrigin: false },
|
|
},
|
|
},
|
|
});
|