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>
This commit is contained in:
@@ -20,7 +20,8 @@ export default defineConfig({
|
||||
alias: {
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
||||
'@shared': fileURLToPath(new URL('../../shared', import.meta.url))
|
||||
}
|
||||
},
|
||||
dedupe: ['vue', 'vue-router', 'pinia', 'primevue']
|
||||
},
|
||||
server: {
|
||||
port: 3000,
|
||||
@@ -52,9 +53,15 @@ export default defineConfig({
|
||||
}
|
||||
}
|
||||
},
|
||||
optimizeDeps: {
|
||||
include: ['vue', 'vue-router', 'pinia']
|
||||
},
|
||||
build: {
|
||||
outDir: 'dist',
|
||||
sourcemap: true,
|
||||
commonjsOptions: {
|
||||
include: [/node_modules/, /shared/]
|
||||
},
|
||||
// Cache busting - generează hash-uri noi la fiecare build
|
||||
assetsInlineLimit: 0, // Nu inline asset-uri mici, folosește fișiere separate cu hash
|
||||
rollupOptions: {
|
||||
|
||||
Reference in New Issue
Block a user