From 34c7df54115a94efe0a6dc436bd5d90d140ebdda Mon Sep 17 00:00:00 2001 From: ICheered Date: Sat, 5 Aug 2023 13:57:40 +0200 Subject: [PATCH] Hide common issues in details/summary --- README.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 280c381..eff3bff 100644 --- a/README.md +++ b/README.md @@ -78,9 +78,10 @@ npx serve examples/preact # starts a local server with COOP/COEP Then, navigate to http://localhost:3000/ in Chrome. ## Common Issues - -### SharedArrayBuffer can not be found - +
+ +SharedArrayBuffer can not be found + SharedArrayBuffer has been disabled across all browsers due to the Spectre vulnerability. This package uses SharedArrayBuffer to communicate with the WebAssembly module. To work around this issue, you need to set two response headers for your document: ``` @@ -89,9 +90,12 @@ Cross-Origin-Embedder-Policy: require-corp ``` Information from [Stackoverflow](https://stackoverflow.com/questions/64650119/react-error-sharedarraybuffer-is-not-defined-in-firefox) +
-### Error: Not found: /node_modules/.vite/deps/libapi.wasm - +
+ + Error: Not found: /node_modules/.vite/deps/libapi.wasm + Vite tries to optimize the dependencies by default. This causes the WebAssembly module to be moved to a different location. To prevent this, you need to exclude the web-gphoto2 package from the optimization. In vite, both of the above mentioned issues are solved by adding the following to your vite.config.js: @@ -119,6 +123,7 @@ export default defineConfig({ }, }); ``` +
## See also