Frameworks
Hiraiship looks at your project, recognizes its framework, and picks the build command and output to match. You don't declare anything.
| Framework | Detected by | Build command | Output | Runs as |
|---|---|---|---|---|
rasengan dependency, or rasengan.config.js/.ts | npx rasengan build | dist/client | Static files, or a Worker when server-rendered | |
astro dependency, or astro.config.* | npx astro build | dist | Static files, or a Worker when rendered on demand | |
@react-router/dev dependency, or react-router.config.* | npx react-router build | build/client | Static files as a single-page app, or a Worker when server-rendered | |
vinext dependency | npx vite build | dist/client | Static files as a static export, or a Worker when server-rendered | |
@tanstack/react-start or @tanstack/solid-start dependency | npx vite build | dist/client | Static files as a single-page app, or a Worker when server-rendered | |
hono dependency | npm run build --if-present | One bundled Worker | A Worker | |
| Futon | @rasenganjs/futon dependency | npm run build --if-present | One bundled Worker | A Worker |
vite dependency and a vite build script or a vite.config.* file | npx vite build | dist | Static files | |
| Static | No package.json | None | The directory itself | Static files |
Detection order
Detection reads package.json (dependencies and devDependencies) at the root of what you deploy, and checks the order above. For an app in a subdirectory of a GitHub monorepo, the repository root's package.json dependencies count too, when the app's own name none: shared tooling such as vite often lives there.
- Rasengan.js first, since a Rasengan.js app also depends on Vite.
- Astro, React Router (framework mode), Next.js (vinext), then TanStack Start, which run on Vite too.
- Hono or Futon. A project depending on both is ambiguous and fails with an error: deploy them as two projects.
- Vite, when the
buildscript runsvite buildor avite.config.*file exists. - Otherwise, a directory without a
package.jsonis deployed as a static site. One with apackage.jsonfails with an error naming the supported frameworks: publishing it as it is would publish your source.
The detected framework is shown on each deployment.
Install command
Before building, Hiraiship installs your dependencies with the package manager your lockfile names:
| Lockfile | Install command |
|---|---|
pnpm-lock.yaml | pnpm install |
yarn.lock | yarn install |
bun.lockb | bun install |
package-lock.json, or none | npm install |
A static site skips the install.
Changing the defaults
The install command, build command and output directory can each be replaced, for every deployment of a project or for a single one. See Build settings.
Not supported yet
- TanStack Start server rendering without the Cloudflare plugin: TanStack Start renders on the server only when built with
@cloudflare/vite-plugin. See TanStack Start. - Next.js without vinext: Next.js apps are built with vinext. See Next.js.
- Next.js server rendering without the Cloudflare plugin, or with its 2.0 beta and a
cloudflare.config.ts: vinext renders on the server only when built with@cloudflare/vite-pluginand awrangler.jsonc. See Next.js. - React Router server rendering without the Cloudflare plugin: React Router renders on the server only when built with
@cloudflare/vite-plugin. See React Router. - Astro server rendering with another adapter than
@astrojs/cloudflare(@astrojs/node…). See Astro. - Monorepos: Hiraiship builds the directory you deploy. Deploy the app's own directory, with its own lockfile.
- Other backends (Express, Fastify, NestJS): they need a Node.js server, which Workers don't provide.