fix(core): resolve local client url redirects and stabilize dev environment
- enforce localhost:5174 for wheel campaign client URL in local development - lock vite dev server ports using strictPort on admin (5173) and client (5174) - sanitize .env.example and remove hardcoded staging domain - configure root dev orchestration and docker multi-stage build context
This commit is contained in:
@@ -10,8 +10,31 @@ export default defineConfig({
|
||||
'@lucky-wheel/shared-types': path.resolve(__dirname, '../../packages/shared-types/src/index.ts'),
|
||||
},
|
||||
},
|
||||
build: {
|
||||
target: 'es2020',
|
||||
cssCodeSplit: true,
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks(id) {
|
||||
if (id.includes('node_modules')) {
|
||||
if (id.includes('vue') || id.includes('pinia') || id.includes('vue-router')) {
|
||||
return 'vendor-vue';
|
||||
}
|
||||
if (id.includes('lucide') || id.includes('canvas-confetti')) {
|
||||
return 'vendor-ui';
|
||||
}
|
||||
}
|
||||
if (id.includes('/components/wheels/')) {
|
||||
const name = id.split('/components/wheels/')[1]?.split('.')[0];
|
||||
if (name) return `wheel-${name.toLowerCase()}`;
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
server: {
|
||||
port: 5174,
|
||||
strictPort: true,
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://localhost:3000',
|
||||
|
||||
Reference in New Issue
Block a user