30 lines
683 B
TypeScript
30 lines
683 B
TypeScript
import { defineConfig } from "vite";
|
|
import deno from "@deno/vite-plugin";
|
|
import preact from "@preact/preset-vite";
|
|
import tailwindcss from "tailwindcss";
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [deno(), preact()],
|
|
css: {
|
|
postcss: {
|
|
plugins: [tailwindcss()],
|
|
},
|
|
},
|
|
server: {
|
|
proxy: {
|
|
"/api": {
|
|
target: "http://localhost:8000",
|
|
changeOrigin: true,
|
|
// rewrite: (path) => path.replace(/^\/api/, ""),
|
|
},
|
|
"/puppet": {
|
|
target: "http://localhost:8000",
|
|
changeOrigin: true,
|
|
// rewrite: (path) => path.replace(/^\/puppet/, ""),
|
|
ws: true,
|
|
},
|
|
},
|
|
},
|
|
});
|