import { defineConfig, loadEnv, type Plugin } from 'vite'; import react from '@vitejs/plugin-react'; import { nodePolyfills } from 'vite-plugin-node-polyfills'; import { createHash } from 'node:crypto'; import { readFileSync, writeFileSync } from 'node:fs'; import { join } from 'node:path'; // Subresource integrity (docs/SECURITY-ROADMAP.md item 2): after the // bundle is written, stamp every