Created
February 15, 2026 20:57
-
-
Save ewmb7701/faf7f4f20184651dea873e1223a62e65 to your computer and use it in GitHub Desktop.
web-dev-server.config.mjs for bevy app website in workspace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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