Seems like they still have to update their stuff a fair few places...
Now I'm just struggling to use the package registry, none of the copy and paste examples have worked for me, but I'm sure I can figure it out. Will post here if I do.
i thought it was interesting and few (3-4) people would like it. i ABSOLUTELY did not expect for anyone to actually look at this with any amount of thought nor care.
it is a hack that this works and is guaranteed something that does not make OpenAI happy. rewriting to reflect this.
For the CORS with Vite you can just set a config like so in vite.config.ts
import { defineConfig } from "vite";
export default defineConfig({ server: { headers: { "Cross-Origin-Embedder-Policy": "require-corp", "Cross-Origin-Opener-Policy": "same-origin", }, }, });
I was then able to just use this code example with one caveat (https://github.com/wasmerio/wasmer-js?tab=readme-ov-file#use...)
I had to update the SDK import with crossorigin="anonymous"