update the upload

This commit is contained in:
proddy
2024-08-14 18:53:52 +02:00
parent d5fec4aec8
commit 5a058746bb
11 changed files with 466 additions and 720 deletions

View File

@@ -4,11 +4,13 @@ import { defineConfig } from 'vite';
import viteImagemin from 'vite-plugin-imagemin';
import viteTsconfigPaths from 'vite-tsconfig-paths';
import mockServer from '../mock-api/mockServer.js';
export default defineConfig(({ command, mode }) => {
if (command === 'serve') {
console.log('Preparing for standalone build with server, mode=' + mode);
return {
plugins: [preact(), viteTsconfigPaths()],
plugins: [preact(), viteTsconfigPaths(), mockServer()],
server: {
open: true,
port: mode == 'production' ? 4173 : 3000,
@@ -23,7 +25,6 @@ export default defineConfig(({ command, mode }) => {
changeOrigin: true,
secure: false
},
'/rest/uploadFile': 'http://localhost:3082', // this must come first to work!
'/rest': 'http://localhost:3080'
}
}