add dockerfile

This commit is contained in:
2026-08-10 14:37:51 +05:30
parent 76412b08b4
commit 7b1af5a8ef
4 changed files with 137 additions and 0 deletions

View File

@@ -11,6 +11,21 @@ export default defineConfig({
'@': path.resolve(import.meta.dirname, './src'),
},
},
build: {
rollupOptions: {
output: {
// Split the heavy libraries out of the app bundle. They change far less
// often than app code, so browsers keep them cached across deploys.
manualChunks: {
react: ['react', 'react-dom', 'react-router-dom'],
charts: ['recharts'],
motion: ['framer-motion'],
markdown: ['react-markdown'],
canvas: ['html2canvas'],
},
},
},
},
server: {
// Honor a port assigned by the environment; fall back to Vite's default.
port: process.env.PORT ? Number(process.env.PORT) : 5173,