From 1bcc5a625bca2eaeef2b7b5c55c78c67683fb7c2 Mon Sep 17 00:00:00 2001 From: AuroraZiling <2935876049@qq.com> Date: Wed, 25 Oct 2023 13:12:59 +0800 Subject: [PATCH] feat: add cross-platform support for Mac --- vite.config.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vite.config.ts b/vite.config.ts index 8733815f..aeb7612c 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -24,6 +24,11 @@ export default defineConfig({ // to make use of `TAURI_DEBUG` and other env variables // https://tauri.studio/v1/api/config#buildconfig.beforedevcommand envPrefix: ["VITE_", "TAURI_"], + esbuild: { + supported: { + 'top-level-await': true + }, + }, build: { // Tauri supports es2021 target: process.env.TAURI_PLATFORM === "windows" ? "chrome105" : "safari13",