This example shows how to build a Create React App static site and host the generated output on Wasmer Edge.
https://<your-subdomain>.wasmer.app/ (deploy to get a live URL)
package.jsonincludes React andreact-scripts.scripts/build-static.mjsemits the static output used by this compact example.- Wasmer Edge serves the generated files from
build/directly.
npm install
npm run build
npx serve buildOpen http://127.0.0.1:3000/ to preview the generated static site.
- Build the site:
npm run build(createsbuild/). - Configure Wasmer Edge to publish the
build/directory. - Deploy and visit
https://<your-subdomain>.wasmer.app/.