import { readFileSync } from 'node:fs' import { fileURLToPath, URL } from 'node:url' import type { Plugin } from 'vite' import { defineConfig } from 'vitest/config' import react from '@vitejs/plugin-react' import tailwindcss from '@tailwindcss/vite' /** * The development Content-Security-Policy, injected by `vite dev` and by nothing else. * * A release build's policy is `app.security.csp` in tauri.conf.json, which Tauri injects itself. * Development needs a looser `style-src` — Vite injects CSS as