mirror of
https://github.com/BreizhHardware/Jellystat.git
synced 2026-01-18 16:27:20 +01:00
Changed Dockerfile as previos file was failing to build consistently removed some unused packages added compression to json payloads changed vite ports to 3000 to not break existing builds backend and frontend both use port 3000 now
51 lines
1.2 KiB
JavaScript
51 lines
1.2 KiB
JavaScript
import { defineConfig, splitVendorChunkPlugin } from 'vite';
|
|
import react from '@vitejs/plugin-react-swc';
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
optimizeDeps: {
|
|
include: [
|
|
'react',
|
|
'react-dom',
|
|
'react-router-dom',
|
|
'axios',
|
|
'react-toastify',
|
|
],
|
|
esbuildOptions: {
|
|
loader: {
|
|
'.js': 'jsx',
|
|
},
|
|
},
|
|
},
|
|
server: {
|
|
// port for exposing frontend
|
|
port: 3000,
|
|
// port for exposing APIs
|
|
proxy: {
|
|
'/api': 'http://localhost:3000',
|
|
'/proxy': 'http://localhost:3000',
|
|
'/stats': 'http://localhost:3000',
|
|
'/sync': 'http://localhost:3000',
|
|
'/auth': 'http://localhost:3000',
|
|
'/backup': 'http://localhost:3000',
|
|
'/logs': 'http://localhost:3000',
|
|
'/socket.io': 'http://localhost:3000',
|
|
'/swagger': 'http://localhost:3000',
|
|
'/utils': 'http://localhost:3000',
|
|
},
|
|
},
|
|
target: ['es2015'],
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
react: ['react'],
|
|
'react-dom': ['react-dom'],
|
|
'react-router-dom': ['react-router-dom'],
|
|
axios: ['axios'],
|
|
'react-toastify': ['react-toastify'],
|
|
},
|
|
},
|
|
},
|
|
plugins: [react(), splitVendorChunkPlugin()],
|
|
});
|