Files
roa2web-service-auto/data-entry-app/frontend/vite.config.js
Marius Mutu ee239eb3f3 fix: Resolve shared component styling and Vite module deduplication
- Add dedupe option for vue, vue-router, pinia, primevue in both Vite configs
  to prevent duplicate module issues when using shared components
- Add optimizeDeps and commonjsOptions for better shared module handling
- Fix CompanySelector and PeriodSelector header variants to support both
  light headers (using CSS variables) and gradient headers (white text)
- Make hamburger button always display:flex for consistent mobile layout

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-19 12:35:14 +02:00

34 lines
830 B
JavaScript

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { fileURLToPath, URL } from 'node:url'
export default defineConfig({
plugins: [vue()],
// Base path for production deployment in IIS subdirectory
base: process.env.NODE_ENV === 'production' ? '/data-entry/' : '/',
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
'@shared': fileURLToPath(new URL('../../shared', import.meta.url))
},
dedupe: ['vue', 'vue-router', 'pinia', 'primevue']
},
server: {
port: 3010,
proxy: {
'/api': {
target: 'http://localhost:8003',
changeOrigin: true,
},
'/uploads': {
target: 'http://localhost:8003',
changeOrigin: true,
}
}
},
build: {
outDir: 'dist',
sourcemap: true,
}
})