import { defineConfig } from 'vitest/config'; export default defineConfig({ test: { environment: 'node', include: ['src/**/*.test.ts'], pool: 'forks', forks: { // @automerge/automerge ships a node-specific entry (fullfat_node.js, // loads WASM from disk) and a browser entry (fullfat_base64.js, embeds // ~3.5MB of WASM as base64). Vite picks browser by default and OOMs. // --conditions=node tells Node.js to prefer the node condition when // Vite externalises the package and falls back to native resolution. execArgv: ['--conditions=node'], }, server: { deps: { external: [/@automerge/], }, }, }, });