harb/landing/vite.config.ts
openhands a46c30cff6 fix: landing page user test fixes (#162)
- Add VueQueryPlugin to landing main.ts (wagmi/vue requires it)
- Add Vite proxy for /api/graphql → ponder:42069/graphql
- Replace axios with native fetch in WalletCard.vue
- Add navigateTo() for CTA buttons (uses VITE_APP_URL env)
- Load contract addresses from bootstrap in landing entrypoint
- Add via_ir to foundry.toml (OptimizerV3Push3 stack-too-deep)
- Add VITE_APP_URL env to docker-compose landing service

Fixes: blank landing pages, broken LiveStats, missing CTA links,
missing contract addresses in footer
2026-02-23 14:47:38 +00:00

30 lines
772 B
TypeScript

import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueDevTools from 'vite-plugin-vue-devtools'
// https://vite.dev/config/
export default defineConfig({
// base: "/KraikenLanding/",
plugins: [
vue(),
vueDevTools(),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
},
},
server: {
// Allow health checks from CI containers and proxy
allowedHosts: ['landing', 'caddy', 'localhost', '127.0.0.1'],
proxy: {
'/api/graphql': {
target: process.env.VITE_PONDER_URL || 'http://ponder:42069',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/graphql/, '/graphql'),
},
},
},
})