mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
update the upload
This commit is contained in:
@@ -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'
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user