add new sveltekit frontend

This commit is contained in:
Sam 2023-03-11 16:54:58 +01:00
commit fc4334932a
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
40 changed files with 3802 additions and 0 deletions

23
frontend/vite.config.ts Normal file
View file

@ -0,0 +1,23 @@
import { sveltekit } from "@sveltejs/kit/vite";
import { defineConfig } from "vite";
export default defineConfig({
plugins: [sveltekit()],
server: {
proxy: {
"/api": {
target: "http://localhost:8080",
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ""),
},
"/media": {
target: "http://localhost:9000",
changeOrigin: true,
rewrite: (path) => path.replace(/^\/media/, "/pronouns.cc"),
},
},
},
ssr: {
noExternal: ["@popperjs/core"],
},
});