feat(web): add client-side telemetry with Web Vitals and dev metrics endpoint

This commit is contained in:
MythEclipse
2026-06-07 18:13:11 +07:00
parent eefb16ad1d
commit 5a47b0c658
8 changed files with 122 additions and 7 deletions
+2 -1
View File
@@ -2,13 +2,14 @@ import react from '@vitejs/plugin-react';
import tsconfigPaths from 'vite-tsconfig-paths';
import path from 'node:path';
import { defineConfig, loadEnv } from 'vite';
import { metricsPlugin } from './vite-plugin-metrics';
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '');
const apiProxyTarget = env.VITE_API_PROXY_TARGET || 'http://localhost:3000';
return {
plugins: [react(), tsconfigPaths()],
plugins: [react(), tsconfigPaths(), metricsPlugin()],
server: {
proxy: {
'/api': apiProxyTarget,