pronounsfu/frontend/vite.config.ts

26 lines
692 B
TypeScript
Raw Normal View History

2023-03-09 08:08:43 -08:00
import { sveltekit } from "@sveltejs/kit/vite";
import { defineConfig } from "vite";
2023-03-24 17:24:05 -07:00
import { plugin as markdown, Mode as MarkdownMode } from "vite-plugin-markdown";
2023-03-09 08:08:43 -08:00
export default defineConfig({
2023-03-24 17:24:05 -07:00
plugins: [sveltekit(), markdown({ mode: [MarkdownMode.HTML] })],
2023-03-09 08:08:43 -08:00
server: {
2023-08-02 14:24:38 -07:00
host: "127.0.0.1",
2023-03-09 08:08:43 -08:00
proxy: {
"/api": {
target: "http://localhost:8080",
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ""),
},
"/media": {
target: "http://localhost:9000",
changeOrigin: true,
2023-03-10 16:36:30 -08:00
rewrite: (path) => path.replace(/^\/media/, "/pronouns.cc"),
2023-03-09 08:08:43 -08:00
},
},
},
2023-03-10 16:36:30 -08:00
ssr: {
noExternal: ["@popperjs/core"],
},
2023-03-09 08:08:43 -08:00
});