From feb81c6c03bb8ac8ab3be0d32016c53bf8f72bbe Mon Sep 17 00:00:00 2001 From: Valere Date: Mon, 3 Mar 2025 14:45:06 +0100 Subject: [PATCH] Devex: Default vite config to support using local build of crypto wasm --- vite.config.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/vite.config.js b/vite.config.js index 5aaee3ab..6abdcfcb 100644 --- a/vite.config.js +++ b/vite.config.js @@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial Please see LICENSE in the repository root for full details. */ -import { defineConfig, loadEnv } from "vite"; +import { defineConfig, loadEnv, searchForWorkspaceRoot } from "vite"; import svgrPlugin from "vite-plugin-svgr"; import { createHtmlPlugin } from "vite-plugin-html"; import { codecovVitePlugin } from "@codecov/vite-plugin"; @@ -67,6 +67,14 @@ export default defineConfig(({ mode, packageType }) => { return { server: { port: 3000, + fs: { + allow: [ + // search up for workspace root + searchForWorkspaceRoot(process.cwd()), + // Allow fs access to local build of wasm + "../matrix-rust-sdk-crypto-wasm/pkg", + ], + }, }, build: { sourcemap: true,