Files
ForumMobile/vite.config.ts

51 lines
1.1 KiB
TypeScript

import { defineConfig } from 'vite';
export default defineConfig({
root: './src',
build: {
outDir: '../dist',
minify: false,
emptyOutDir: true,
sourcemap: true,
target: 'esnext' // modern version of browsers, allows top-level await
},
server: {
proxy: {
"/ws": {
target: "http://localhost:10002",
changeOrigin: true,
ws: true
},
"/profile/upload-image": {
target: "http://localhost:10002",
changeOrigin: true
},
"/api": {
target: "http://localhost:10002",
changeOrigin: true
},
"/db": {
target: "http://localhost:10002",
changeOrigin: true
},
"/apps": {
target: "http://localhost:10002",
changeOrigin: true
},
"/auth": {
target: "http://localhost:10002",
changeOrigin: true
},
"/@server": {
target: "http://localhost:10002",
changeOrigin: true
}
},
host: true,
allowedHosts: ['sam.local'],
},
esbuild: {
keepNames: true
}
});