synor/apps/explorer-web/vite.config.ts
Gulshan Yadav 48949ebb3f Initial commit: Synor blockchain monorepo
A complete blockchain implementation featuring:
- synord: Full node with GHOSTDAG consensus
- explorer-web: Modern React blockchain explorer with 3D DAG visualization
- CLI wallet and tools
- Smart contract SDK and example contracts (DEX, NFT, token)
- WASM crypto library for browser/mobile
2026-01-08 05:22:17 +05:30

33 lines
973 B
TypeScript

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
export default defineConfig({
plugins: [react()],
server: {
port: 3001,
proxy: {
'/api': {
target: 'http://localhost:3000',
changeOrigin: true,
},
},
},
build: {
rollupOptions: {
output: {
manualChunks: {
// Core React vendor chunk
'vendor-react': ['react', 'react-dom', 'react-router-dom'],
// 3D visualization libraries (lazy loaded, kept together for caching)
'vendor-three': ['three'],
'vendor-force-graph': ['react-force-graph-3d'],
// Utilities
'vendor-utils': ['@tanstack/react-virtual', 'date-fns', 'zustand'],
},
},
},
// 3D visualization libraries (Three.js, force-graph) are inherently large (~800KB each)
// These are lazy-loaded and cached separately, so we increase the limit
chunkSizeWarningLimit: 800,
},
});