Skip to content

Instantly share code, notes, and snippets.

@ewmb7701
Created February 15, 2026 20:57
Show Gist options
  • Select an option

  • Save ewmb7701/faf7f4f20184651dea873e1223a62e65 to your computer and use it in GitHub Desktop.

Select an option

Save ewmb7701/faf7f4f20184651dea873e1223a62e65 to your computer and use it in GitHub Desktop.
web-dev-server.config.mjs for bevy app website in workspace
import { resolve } from "node:path";
import serve from "koa-static";
import mount from "koa-mount";
const ROOT_DIR = resolve(import.meta.dirname, "./code");
const ASSETS_DIR = resolve(import.meta.dirname, "../../assets");
const APPS_DIR = resolve(
import.meta.dirname,
"../../build/wasm32-unknown-unknown/debug",
);
export default {
rootDir: ROOT_DIR,
appIndex: "index.html",
middleware: [
mount("/assets", serve(ASSETS_DIR)),
mount("/apps", serve(APPS_DIR)),
],
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment