mirror of
https://github.com/BreizhHardware/Jellystat.git
synced 2026-01-18 16:27:20 +01:00
changed all extensions from js to jsx added proxies in vite config set up chunk for smaller distribution size remove setupProxy remove reportWebVitals
34 lines
931 B
JavaScript
34 lines
931 B
JavaScript
import { defineConfig, splitVendorChunkPlugin } from 'vite';
|
|
import react from '@vitejs/plugin-react-swc';
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
server: {
|
|
port: 3000,
|
|
proxy: {
|
|
'/api': 'http://localhost:3003',
|
|
'/proxy': 'http://localhost:3003',
|
|
'/stats': 'http://localhost:3003',
|
|
'/sync': 'http://localhost:3003',
|
|
'/auth': 'http://localhost:3003',
|
|
'/backup': 'http://localhost:3003',
|
|
'/logs': 'http://localhost:3003',
|
|
'/socket.io': 'http://localhost:3003',
|
|
'/swagger': 'http://localhost:3003',
|
|
'/utils': 'http://localhost:3003',
|
|
},
|
|
},
|
|
target: ['es2015'],
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
react: ['react'],
|
|
axios: ['axios'],
|
|
'react-router-dom': ['react-router-dom'],
|
|
'react-toastify': ['react-toastify'],
|
|
},
|
|
},
|
|
},
|
|
plugins: [react(), splitVendorChunkPlugin()],
|
|
});
|