Skip to main content

Supported frameworks

Layero detects the framework automatically from the contents of package.json, the config files in the root and the lockfile. When auto-detection gets it wrong, override the choice through layero.json, the layero deploy --type flag, or the project settings in the dashboard.

Auto-detection (static)

The order of checks matters — the first match wins:

FrameworkSignalOutput dir
Next.js (export)dep nextout
Nuxtdep nuxt.output/public
Remix / React Router v7dep @remix-run/* / @react-router/*build/client
SvelteKitdep @sveltejs/kit + svelte.config.*build
Gatsbydep gatsbypublic
Astrodep astrodist
Docusaurusdep @docusaurus/corebuild
Storybookdep @storybook/*storybook-static
VitePressdep vitepress.vitepress/dist
Vitedep vitedist (or outDir from vite.config, if set)
Angulardep @angular/core or angular.jsondist/{project}/browser
Create React Appdep react-scriptsbuild
Eleventy (11ty)dep @11ty/eleventy or eleventy.config.*_site
Hugohugo.toml or config.tomlpublic
Staticonly HTML in the root, no package.json.
Genericfallback (Manual Mode)dist

The default build command is npm run build (or yarn build / pnpm build, depending on the lockfile). Hugo is built with hugo --gc --minify, Nuxt with nuxt generate.

Setting the preset explicitly

Through the CLI:

layero deploy --type vite

Accepted values: nextjs, nuxt, remix, sveltekit, gatsby, astro, docusaurus, storybook, vitepress, vite, angular, cra, eleventy, hugo, static, generic. Common aliases work too — next, react-router, rr7, ng, 11ty.

Through layero.json in the repository root:

{
"$schema": "https://layero.ru/schema/layero-v2.json",
"framework": "vite",
"buildCommand": "pnpm build:prod",
"outputDirectory": "bundle"
}

static means no build at all: whatever sits in the root goes to S3, minus the ignore rules. Handy for ready-made HTML.

Runtime applications

Next.js in server mode (without output: 'export'), Streamlit, Gradio, Flask and the like run as containers — a separate mode, see Runtime.

Node version

Sources, in priority order:

  1. Project settings (Project → Settings → Node.js version)
  2. .nvmrc
  3. .node-version
  4. package.jsonengines.node
  5. Node 22 by default

For overrides and version retirement, see Runtime versions.

Package manager

Determined by the lockfile:

LockfileManager
yarn.lockyarn
pnpm-lock.yamlpnpm
package-lock.json, or nonenpm
npm and optional dependencies

If your package-lock.json was generated on macOS while the build environment is Linux, npm ci can hang for a long time on platform-specific optional dependencies. If you hit this, commit a lockfile generated on Linux, or switch to pnpm or yarn.