pronounss/frontend/vite.config.ts

25 lines
669 B
TypeScript
Raw Permalink Normal View History

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