import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; import { fileURLToPath } from 'node:url'; const root = fileURLToPath(new URL('../..', import.meta.url)); const p = (rel: string) => fileURLToPath(new URL(rel, import.meta.url)); export default defineConfig({ plugins: [react()], resolve: { alias: { '@contracts': `${root}packages/contracts/src/index.ts`, '@sfeel': `${root}packages/sfeel/src/index.ts`, '@ui': `${root}packages/ui-kit/src/index.ts`, '@utils': `${root}packages/utils/src/index.ts`, '@features': p('./src/features'), '@web-shared': p('./src/shared'), }, }, server: { port: 5173, proxy: { '/api': { target: 'http://localhost:8787', changeOrigin: true }, }, }, });