harb/landing/vite.config.ts
openhands b228482694 fix: resolve @harb/ui-shared via Vite alias in webapp and landing (#150)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-24 13:42:22 +00:00

31 lines
868 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)),
'@harb/ui-shared': fileURLToPath(new URL('../packages/ui-shared/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'),
},
},
},
})