From 2ffdb03c1c2044daa1af7558f52de0cc6d3635ec Mon Sep 17 00:00:00 2001 From: bal7hazar Date: Fri, 10 Jan 2025 16:16:56 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=9A=20Fix=20build?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/profile/package.json | 1 + packages/profile/vite.config.ts | 3 ++- pnpm-lock.yaml | 13 +++++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/packages/profile/package.json b/packages/profile/package.json index 51cc07191..f1299f06c 100644 --- a/packages/profile/package.json +++ b/packages/profile/package.json @@ -32,6 +32,7 @@ "sonner": "^1.4.41", "starknet": "^6.11.0", "viem": "^2.21.32", + "vite-plugin-top-level-await": "^1.4.4", "vite-plugin-wasm": "^3.3.0", "zod": "^3.23.8" }, diff --git a/packages/profile/vite.config.ts b/packages/profile/vite.config.ts index 4fc2a6d00..5763ec9fa 100644 --- a/packages/profile/vite.config.ts +++ b/packages/profile/vite.config.ts @@ -1,11 +1,12 @@ import { defineConfig } from "vite"; import wasm from "vite-plugin-wasm"; import react from "@vitejs/plugin-react-swc"; +import topLevelAwait from "vite-plugin-top-level-await"; import process from "node:process"; // https://vitejs.dev/config/ export default defineConfig({ - plugins: [react(), wasm()], + plugins: [react(), wasm(), topLevelAwait()], server: { port: process.env.NODE_ENV === "development" ? 3003 : undefined, }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e8b00a25a..c7e8eb1cd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -567,6 +567,9 @@ importers: viem: specifier: ^2.21.32 version: 2.21.32(typescript@5.5.4)(zod@3.23.8) + vite-plugin-top-level-await: + specifier: ^1.4.4 + version: 1.4.4(@swc/helpers@0.5.5)(rollup@4.24.0)(vite@5.4.8(@types/node@20.16.11)(terser@5.34.1)) vite-plugin-wasm: specifier: ^3.3.0 version: 3.3.0(vite@5.4.8(@types/node@20.16.11)(terser@5.34.1)) @@ -26667,6 +26670,16 @@ snapshots: transitivePeerDependencies: - rollup + vite-plugin-top-level-await@1.4.4(@swc/helpers@0.5.5)(rollup@4.24.0)(vite@5.4.8(@types/node@20.16.11)(terser@5.34.1)): + dependencies: + '@rollup/plugin-virtual': 3.0.2(rollup@4.24.0) + '@swc/core': 1.7.35(@swc/helpers@0.5.5) + uuid: 10.0.0 + vite: 5.4.8(@types/node@20.16.11)(terser@5.34.1) + transitivePeerDependencies: + - '@swc/helpers' + - rollup + vite-plugin-top-level-await@1.4.4(@swc/helpers@0.5.5)(rollup@4.24.0)(vite@5.4.8(@types/node@22.10.1)(terser@5.34.1)): dependencies: '@rollup/plugin-virtual': 3.0.2(rollup@4.24.0)