Skip to content

Frameworks

Hiraiship looks at your project, recognizes its framework, and picks the build command and output to match. You don't declare anything.

FrameworkDetected byBuild commandOutputRuns as
Rasengan.jsrasengan dependency, or rasengan.config.js/.tsnpx rasengan builddist/clientStatic files, or a Worker when server-rendered
Astroastro dependency, or astro.config.*npx astro builddistStatic files, or a Worker when rendered on demand
React Router@react-router/dev dependency, or react-router.config.*npx react-router buildbuild/clientStatic files as a single-page app, or a Worker when server-rendered
Next.jsvinext dependencynpx vite builddist/clientStatic files as a static export, or a Worker when server-rendered
TanStack Start@tanstack/react-start or @tanstack/solid-start dependencynpx vite builddist/clientStatic files as a single-page app, or a Worker when server-rendered
Honohono dependencynpm run build --if-presentOne bundled WorkerA Worker
Futon@rasenganjs/futon dependencynpm run build --if-presentOne bundled WorkerA Worker
Vitevite dependency and a vite build script or a vite.config.* filenpx vite builddistStatic files
StaticNo package.jsonNoneThe directory itselfStatic 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.

  1. Rasengan.js first, since a Rasengan.js app also depends on Vite.
  2. Astro, React Router (framework mode), Next.js (vinext), then TanStack Start, which run on Vite too.
  3. Hono or Futon. A project depending on both is ambiguous and fails with an error: deploy them as two projects.
  4. Vite, when the build script runs vite build or a vite.config.* file exists.
  5. Otherwise, a directory without a package.json is deployed as a static site. One with a package.json fails 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:

LockfileInstall command
pnpm-lock.yamlpnpm install
yarn.lockyarn install
bun.lockbbun install
package-lock.json, or nonenpm 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-plugin and a wrangler.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.