55 lines
1.5 KiB
TypeScript
55 lines
1.5 KiB
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
|
|
const base = process.env.VITE_BASE_URL ?? '/krishna_sales'
|
|
|
|
export default defineConfig(() => ({
|
|
base,
|
|
<<<<<<< HEAD
|
|
plugins: [react(), tailwindcss()],
|
|
}));
|
|
=======
|
|
plugins: [
|
|
react(),
|
|
tailwindcss(),
|
|
VitePWA({
|
|
registerType: 'autoUpdate',
|
|
pwaAssets: { image: 'public/Krishna-logo.png' },
|
|
manifest: {
|
|
name: 'Krishna Sales',
|
|
short_name: 'Krishna',
|
|
description: 'Field Sales console',
|
|
theme_color: '#0B1B3B',
|
|
background_color: '#0B1B3B',
|
|
display: 'standalone',
|
|
orientation: 'portrait',
|
|
start_url: base + 'orders',
|
|
scope: base,
|
|
},
|
|
workbox: {
|
|
navigateFallback: base + 'index.html',
|
|
navigateFallbackDenylist: [/^\/usr\//, /^\/app\//],
|
|
globPatterns: ['**/*.{js,css,html,svg,png,ico,woff2}'],
|
|
},
|
|
devOptions: { enabled: false },
|
|
}),
|
|
],
|
|
build: {
|
|
chunkSizeWarningLimit: 1000,
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: (id) => {
|
|
if (id.includes('node_modules')) {
|
|
if (id.includes('react') || id.includes('react-dom') || id.includes('react-router-dom')) return 'vendor-react';
|
|
if (id.includes('jspdf')) return 'vendor-pdf';
|
|
if (id.includes('recharts') || id.includes('lucide-react')) return 'vendor-ui';
|
|
return 'vendor';
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
})
|
|
>>>>>>> d8257c3 (added logos)
|