This commit is contained in:
+3
-2
@@ -1,5 +1,6 @@
|
||||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import { uiSourcePlugin } from './ui-source-plugin';
|
||||
import { execSync } from 'child_process';
|
||||
import { resolve } from 'node:path';
|
||||
|
||||
@@ -17,7 +18,7 @@ function getAppVersion(): string {
|
||||
}
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
plugins: [uiSourcePlugin(__dirname), react()],
|
||||
base: '/ui/',
|
||||
define: {
|
||||
__APP_VERSION__: JSON.stringify(getAppVersion()),
|
||||
@@ -33,7 +34,7 @@ export default defineConfig({
|
||||
},
|
||||
server: {
|
||||
proxy: {
|
||||
'/api': 'http://localhost:9876',
|
||||
'/api': { target: 'http://localhost:9876', ws: true },
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user