42 lines
836 B
JavaScript
42 lines
836 B
JavaScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import path from 'node:path';
|
|
import { visualizer } from 'rollup-plugin-visualizer';
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
react(),
|
|
visualizer({ open: false, filename: 'dist/stats.html' }),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
},
|
|
},
|
|
build: {
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
'react-vendor': ['react', 'react-dom'],
|
|
'chart-vendor': ['lightweight-charts'],
|
|
},
|
|
},
|
|
},
|
|
chunkSizeWarningLimit: 1000,
|
|
},
|
|
server: {
|
|
port: 5010,
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:3010',
|
|
changeOrigin: true
|
|
},
|
|
'/ws': {
|
|
target: 'ws://localhost:3010',
|
|
ws: true
|
|
}
|
|
}
|
|
}
|
|
});
|
|
|