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: {
|
2023-08-02 23:24:38 +02:00
|
|
|
host: "127.0.0.1",
|
2023-03-09 17:08:43 +01:00
|
|
|
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
|
|
|
});
|