Files
DentalManagementMH06/apps/Frontend/vite.config.js
Gitead b7e06adf2f feat: MassHealth PDF import auto-pays full balance + patient name fix
- PDF import now marks payments as PAID when MassHealth patient's
  mhPaidAmount >= totalBilled (no patient balance)
- Newly created patients from MH vouchers get insuranceProvider = 'MassHealth'
- Existing patients with blank insuranceProvider get it filled on import
- Fix: update patient name from PDF if existing record has empty name
- Various frontend/selenium/route updates

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 00:16:31 -04:00

51 lines
1.8 KiB
JavaScript

import { defineConfig, loadEnv } from "vite";
import react from "@vitejs/plugin-react";
import path from "path";
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), "");
return {
plugins: [react()],
server: {
host: env.HOST,
port: Number(env.PORT),
fs: {
allow: [".."],
},
allowedHosts: [
...(env.VITE_CLOUDFLARE_HOST ? [env.VITE_CLOUDFLARE_HOST] : []),
"192.168.0.94",
],
proxy: {
"/api": {
target: env.VITE_API_BASE_URL_BACKEND || "http://localhost:5000",
changeOrigin: true,
configure: (proxy) => {
proxy.on("proxyReq", (proxyReq, req) => {
const auth = req.headers["authorization"];
if (auth)
proxyReq.setHeader("Authorization", auth);
});
},
},
"/socket.io": {
target: env.VITE_API_BASE_URL_BACKEND || "http://localhost:5000",
changeOrigin: true,
ws: true,
},
},
},
resolve: {
extensions: [".mts", ".ts", ".tsx", ".mjs", ".js", ".jsx", ".json"],
alias: {
"@": path.resolve(__dirname, "src"),
"@repo/db/usedSchemas": path.resolve(__dirname, "../../packages/db/usedSchemas/browser.ts"),
"@repo/db/types": path.resolve(__dirname, "../../packages/db/types/index.ts"),
"@repo/db": path.resolve(__dirname, "../../packages/db"),
},
},
optimizeDeps: {
exclude: ["@repo/db"],
},
};
});