forked from opencast/opencast-admin-interface
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
29 lines (28 loc) · 968 Bytes
/
vite.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import svgr from "vite-plugin-svgr";
import viteTsconfigPaths from 'vite-tsconfig-paths'
import { resolve } from 'path';
export default defineConfig({
base: process.env.PUBLIC_URL || "",
plugins: [react(), svgr(), viteTsconfigPaths()],
build: {
outDir: "build",
},
server: {
open: true,
port: Number(process.env.PORT) || 3000,
proxy: {
'^/(admin-ng|acl-manager|api|info|services|staticfiles|sysinfo|ui)/.*': {
target: process.env.PROXY_TARGET || 'https://develop.opencast.org',
changeOrigin: true,
secure: false,
configure: (proxy, options) => {
const username = 'admin';
const password = 'opencast';
options.auth = process.env.PROXY_AUTH || `${username}:${password}`;
},
},
},
},
})