import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' // Cross-origin isolation headers so SharedArrayBuffer (WASM threads, used by // the threaded BLIS method) is available during local dev/preview. In // production on GitHub Pages these can't be set as headers, so the app also // ships public/coi-serviceworker.js (registered from index.html). const coopCoep = { 'Cross-Origin-Opener-Policy': 'same-origin', 'Cross-Origin-Embedder-Policy': 'require-corp', } // https://vite.dev/config/ export default defineConfig({ plugins: [react()], base: './', server: { headers: coopCoep }, preview: { headers: coopCoep }, })