From ce101b92692ebef442a1185c08278bc9a294505e Mon Sep 17 00:00:00 2001 From: jovonni Date: Fri, 16 Aug 2024 13:45:31 -0400 Subject: [PATCH] fix(vite.config.ts): added resolutions for @noble/hashes dependencies --- ui/vite.config.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ui/vite.config.ts b/ui/vite.config.ts index 627a319..ae12eca 100644 --- a/ui/vite.config.ts +++ b/ui/vite.config.ts @@ -1,7 +1,17 @@ import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; - -// https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], + resolve: { + alias: { + '@noble/hashes/sha256': '../node_modules/@noble/hashes/src/sha256.ts', + '@noble/hashes/sha3': '../node_modules/@noble/hashes/src/sha3.ts', + '@noble/hashes/ripemd160': + '../node_modules/@noble/hashes/src/ripemd160.ts', + '@noble/hashes/sha512': '../node_modules/@noble/hashes/src/sha512.ts', + '@noble/hashes/pbkdf2': '../node_modules/@noble/hashes/src/pbkdf2.ts', + '@noble/hashes/utils': '../node_modules/@noble/hashes/src/utils.ts', + '@noble/hashes/crypto': '../node_modules/@noble/hashes/src/crypto.ts', + }, + }, });