aboutsummaryrefslogtreecommitdiffstats
path: root/vite.config.js
blob: 83626bd522ee0dfa4c592961e5dfa479c2a5f392 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { sveltekit } from "@sveltejs/kit/vite";

import path from "path";

/** @type {import('vite').UserConfig} */
const config = {
  plugins: [sveltekit()],
  resolve: {
    alias: {
      $comp: path.resolve("src/components"),
    },
  },
  server: {
    proxy: {
      "/api": {
        target: "http://localhost:3119",
        rewrite: (path) => path.replace(/^\/api/, ""),
      },
    },
  },
};

export default config;