This example shows how to statically generate a Nuxt 3 app and host it on Wasmer Edge.
Nuxt’s full server-side rendering story for Wasmer (via WinterJS) is in progress. For now, this template targets
npm run generateso you can deploy a pre-rendered site.
https://nuxt-starter-wasmer-examples.wasmer.app/
Key pieces of the starter:
app.vueand components undercomponents/render the UI.nuxt.config.tsuses the default static target; when you runnpm run generatethe site is output to.output/public.- The static folder is served directly by Wasmer Edge, so no serverless functions are required.
Add pages under pages/ or use content modules as usual—just make sure everything can be generated ahead of time.
npm install
npm run devVisit http://127.0.0.1:3000/ for the dev server. To preview the generated output Wasmer will get:
npm run generate
npm run preview- Run
npm run generateto emit the static site into.output/public. - Configure Wasmer Edge to publish
.output/public(or copy it to adist/directory). - Deploy and browse
https://<your-subdomain>.wasmer.app/.