index.html at the root of a folder, with the scripts, styles and assets it loads. Any framework or bundler that can write that folder works, so a game does not have to use Vite. What OpenGame cannot run is a server: server-side rendering on each request, API routes, server actions and middleware need a Node process, and a game on OpenGame has none.
opengame init reads your package.json and the framework’s config, writes the build command and the output folder into opengame.json, and names the setting to change when the project is set to build a server.
We tested each framework except Nuxt on 17 Nov 2026 with a spinning-cube scene: Next.js 16, Vite 8 with React 19 and with React Three Fiber, webpack 5, Parcel 2, Astro 7 and SvelteKit 3, built, checked, served by the same game server players use, and played in Chrome.
Next.js
A Next.js app builds a Node server unless you ask for a static export. Addoutput: "export" to next.config, and next build writes the site to out/:
next.config.mjs
- Render the scene in a client component. Mark the component that holds the canvas with
"use client"and create the renderer inuseEffect, so it runs in the browser and not during the build. React Three Fiber’s<Canvas>works the same way. - No
basePath. Your game is served at the root of a dedicated address, so abasePathsuch as"/game"makes each page ask for files that are not there. If another host needs it, set it from an environment variable that only that host’s build sets. trailingSlasheither way. Links to/aboutfindabout.html, and withtrailingSlash: truethey findabout/index.html.- What a static export cannot do: anything that needs a server at request time, including route handlers that read the request, server actions, cookies, rewrites, redirects,
proxy(middleware) and dynamic routes withoutgenerateStaticParams. Next.js lists them in its static exports guide. Move that work into the game, or onto a server of your own that the game calls overhttps:.
init writes "output": "out". A Next.js project without output: "export" fails with static_build_required, which names the line to add.
React and React Three Fiber
A React game built with Vite writesdist/, the same as any Vite project. React Three Fiber needs no extra setting: <Canvas> creates the renderer in the browser.
With webpack, init reads output.path from webpack.config.js when it is written as path.resolve(__dirname, "build"), and uses dist/ otherwise. An index.html that html-webpack-plugin uses as a template, such as public/index.html, is not taken for the build. A Create React App project writes build/.
Astro, SvelteKit and Nuxt
- Astro builds static pages by default and writes
dist/.output: "server"needs a server adapter, soinitrefuses it. Put the game code in a<script>in the page, or in a client island. - SvelteKit needs
@sveltejs/adapter-staticandexport const prerender = truein the root+layout.js. For a game that renders only in the browser, passfallback: "index.html"to the adapter instead.initusesbuild/, or the adapter’spagesoption. - Nuxt writes a static site to
.output/public/withnuxt generate.nuxt buildmakes a server, soinitrefuses it.
init refuses a base path in Astro and SvelteKit, as it does in Next.js and Vite: Astro’s base, SvelteKit’s paths.base and Vite’s base, when it is a path such as "/my-game/". "./", "/" and a full https: address are fine.
Plain HTML and import maps
A folder withindex.html and no build needs no settings. An import map can point three at a copy in the folder or at a CDN:
index.html
three.module.js and three.core.js from node_modules/three/build/ into the folder, so the game loads without another host. A CDN address such as https://cdn.jsdelivr.net/npm/three@0.180.0/build/three.module.js works too under the current runtime contract, which allows scripts from any https: host, but the game then stops working when that CDN is slow or down. A threaded build also needs the CDN to send CORS headers.
Pages and links
A game’s frame can move between pages of the same build, in the private preview and once published. OpenGame resolves each page address the way static hosts do:
There is no fallback to
index.html for an address with no file, so a client-side router has to start from /.
When check reports a problem
static_build_required: the framework is set to build a server, or to serve under a base path. The message names the setting.missing-importnaming paths under a folder that is not in your build, such asgame/_next/...: a base path or an asset prefix the config sets in a wayinitcannot read. Remove it for the OpenGame build.bare-import: a page imports a package by name, such asimport "three". Upload the folder your build writes, not your source, or add an import map.- The output folder does not exist: the build wrote somewhere else. Set
build.outputinopengame.jsonto the folder withindex.htmlin it.