From 878421beb774942864d43b753ba92bb23d63bfbd Mon Sep 17 00:00:00 2001 From: Ben Wishovich Date: Sun, 6 Nov 2022 11:26:27 -0800 Subject: [PATCH] fix: Add WASM files to Vite Allow List and change devPath to localhost to fix Web Example (#5560) Co-authored-by: Ben Wishovich --- examples/web/core/tauri/tauri.conf.json | 2 +- examples/web/vite.config.ts | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/web/core/tauri/tauri.conf.json b/examples/web/core/tauri/tauri.conf.json index c120bd122a7..dd0a5b0b93a 100644 --- a/examples/web/core/tauri/tauri.conf.json +++ b/examples/web/core/tauri/tauri.conf.json @@ -2,7 +2,7 @@ "build": { "beforeBuildCommand": "yarn build:tauri", "beforeDevCommand": "yarn dev:tauri", - "devPath": "http://127.0.0.1:5173", + "devPath": "http://localhost:5173", "distDir": "../../build" }, "package": { diff --git a/examples/web/vite.config.ts b/examples/web/vite.config.ts index 52478656bef..a36f9ba3be7 100644 --- a/examples/web/vite.config.ts +++ b/examples/web/vite.config.ts @@ -25,6 +25,12 @@ if (TARGET === 'web') { } const config: UserConfig = { + server: { + fs: { + // Allow serving the wasm file from this folder. + allow: ['.'] + } + }, plugins, resolve: { alias: {