Skip to content

ergofriend/remix-workers-satori

Repository files navigation

Remix (Cloudflare Workers) + satori

https://remix-workers-satori.ergofriend.workers.dev

Remix can't bundle *.wasm files, so we need to use worker's wasm_modules.

see also [Feature]: Support Wasm loader in ESBuild · Discussion #2752 · remix-run/remix

wranger.toml

[wasm_modules]
YOGA_WASM = "node_modules/yoga-wasm-web/dist/yoga.wasm"
RESVG_WASM = "node_modules/@resvg/resvg-wasm/index_bg.wasm"

remix.env.d.ts

declare const YOGA_WASM: WebAssembly.Module
declare const RESVG_WASM: WebAssembly.Module

related