Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions discord/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
import { webcrypto } from 'node:crypto'
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import path from "path";

// Ensure a Web Crypto implementation with getRandomValues exists for Vite's build pipeline
if (!globalThis.crypto?.getRandomValues) {
// @ts-expect-error - assigning Web Crypto to the global crypto reference for Node builds
globalThis.crypto = webcrypto as unknown as Crypto
}

// https://vitejs.dev/config/
export default defineConfig({
base: './',
Expand Down