- Image upload works on profile - added multer into package.json for handling image files - files are saved under /db/images/users/user-id/profile.ext
55 lines
1.2 KiB
TypeScript
55 lines
1.2 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
|
|
},
|
|
"/login": {
|
|
target: "http://localhost:10002",
|
|
changeOrigin: true
|
|
},
|
|
"/signup": {
|
|
target: "http://localhost:10002",
|
|
changeOrigin: true
|
|
},
|
|
"/signout": {
|
|
target: "http://localhost:10002",
|
|
changeOrigin: true
|
|
},
|
|
"/profile": {
|
|
target: "http://localhost:10002",
|
|
changeOrigin: true
|
|
},
|
|
"/profile/upload-image": {
|
|
target: "http://localhost:10002",
|
|
changeOrigin: true
|
|
},
|
|
"/api": {
|
|
target: "http://localhost:10002",
|
|
changeOrigin: true
|
|
},
|
|
"/db": {
|
|
target: "http://localhost:10002",
|
|
changeOrigin: true
|
|
}
|
|
},
|
|
host: true,
|
|
allowedHosts: ['sam.local'],
|
|
},
|
|
esbuild: {
|
|
keepNames: true
|
|
}
|
|
});
|