chore(fontend-admin): 🔧 Update Vite configuration for build optimizations
This commit is contained in:
parent
3bf2fe9a60
commit
47ce4b4ddf
2 changed files with 8 additions and 6 deletions
|
|
@ -102,8 +102,10 @@ export default defineConfig({
|
|||
},
|
||||
server: {
|
||||
port: devPort,
|
||||
// Allow Docker service hostname for E2E testing (Vite 6+ blocks unknown hosts by default)
|
||||
allowedHosts: ['localhost', '127.0.0.1', 'platform-admin'],
|
||||
// Bind to all interfaces (IPv4 + IPv6) so Docker's host.docker.internal can reach it
|
||||
host: '0.0.0.0',
|
||||
// Allow Docker service hostname and local dev domains (Vite 6+ blocks unknown hosts by default)
|
||||
allowedHosts: ['localhost', '127.0.0.1', 'platform-admin', 'host.docker.internal', 'admin.atlilith.local'],
|
||||
proxy: {
|
||||
// Feature APIs on dedicated ports
|
||||
'/api/analytics': {
|
||||
|
|
|
|||
|
|
@ -8,10 +8,6 @@ export default defineConfig({
|
|||
versionPlugin({ appName: 'SEO Admin' }),
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
// Fix for react-router-dom v7 internal import resolution
|
||||
'react-router/dom': 'react-router-dom',
|
||||
},
|
||||
// Dedupe packages that use React context to prevent multiple instances
|
||||
dedupe: [
|
||||
'react',
|
||||
|
|
@ -22,6 +18,10 @@ export default defineConfig({
|
|||
'styled-components',
|
||||
],
|
||||
},
|
||||
// Ensure react-router packages are properly bundled
|
||||
optimizeDeps: {
|
||||
include: ['react-router', 'react-router-dom'],
|
||||
},
|
||||
base: '/admin/seo/',
|
||||
server: {
|
||||
// Port from infrastructure/ports.yaml: features.seo.frontend-admin
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue