Back to Blog
Tutorial6 min read2026-05-01

pandastack.json Config Guide: Customize Your Deployment

A complete guide to the pandastack.json configuration file — what each field does, how to set it correctly for your framework, and common examples.

pandastack.json Config Guide: Customize Your Deployment

When you deploy a static site on PandaStack, a single configuration file controls how your project is built and served: pandastack.json. Placed in the root of your repository, this file tells PandaStack what command to run, where to find the output, and what type of project it's deploying. This guide covers every supported field, how to configure them correctly, and ready-to-use examples for popular frameworks.

Why pandastack.json Exists

Different frameworks use different build commands and output different directory names. Astro outputs to dist, Hugo outputs to public, Next.js static export outputs to out, and Eleventy outputs to _site. Without a configuration file, PandaStack would have to guess — or you'd have to configure these values through a UI on every deploy.

pandastack.json solves this by putting deployment configuration alongside your code, in version control. It's committed to your repository, reviewed in pull requests, and always in sync with your project.

The File Structure

{
  "buildCommand": "npm run build",
  "outputDir": "dist",
  "type": "static"
}

That's the complete file. Three fields, all purposeful.

Field Reference

buildCommand

Type: string

Required: Yes

The shell command PandaStack runs to build your project. This command is executed from the root of your repository after dependencies are installed.

{
  "buildCommand": "npm run build"
}

You can use any shell command here. Multi-step builds work using &&:

{
  "buildCommand": "npm run generate:data && npm run build"
}

Or using an npm script that chains commands in your package.json.

outputDir

Type: string

Required: Yes

The directory that contains your built static files after buildCommand completes. PandaStack uploads the contents of this directory for hosting.

{
  "outputDir": "dist"
}

Use a path relative to the repository root. If your project is in a subdirectory (e.g., a monorepo), the path should still be relative to the root:

{
  "buildCommand": "cd frontend && npm run build",
  "outputDir": "frontend/dist"
}

type

Type: string

Required: Yes (for static sites)

Specifies the deployment type. For static sites, set this to "static".

{
  "type": "static"
}

Framework Configuration Examples

Next.js (Static Export)

First, add output: 'export' to your next.config.js. Then:

{
  "buildCommand": "npm run build",
  "outputDir": "out",
  "type": "static"
}

Astro

{
  "buildCommand": "npm run build",
  "outputDir": "dist",
  "type": "static"
}

Hugo

{
  "buildCommand": "hugo --minify",
  "outputDir": "public",
  "type": "static"
}

Eleventy (11ty)

{
  "buildCommand": "npx @11ty/eleventy",
  "outputDir": "_site",
  "type": "static"
}

Vite (React, Vue, Svelte)

{
  "buildCommand": "npm run build",
  "outputDir": "dist",
  "type": "static"
}

Create React App

{
  "buildCommand": "npm run build",
  "outputDir": "build",
  "type": "static"
}

VitePress

{
  "buildCommand": "npm run docs:build",
  "outputDir": "docs/.vitepress/dist",
  "type": "static"
}

SvelteKit (Static Adapter)

With @sveltejs/adapter-static configured:

{
  "buildCommand": "npm run build",
  "outputDir": "build",
  "type": "static"
}

Placing the File

The pandastack.json file must be in the root of your repository:

your-project/
├── pandastack.json   ← here
├── package.json
├── src/
└── ...

Commit it to version control so it's available on every branch PandaStack deploys.

How PandaStack Uses the File

When you push to a connected GitHub repository:

  1. 1PandaStack clones the repository at the commit that was pushed.
  2. 2It reads pandastack.json from the root.
  3. 3It installs dependencies (running npm install or the equivalent for your package manager).
  4. 4It executes the buildCommand.
  5. 5It uploads the contents of outputDir to the CDN.
  6. 6Your updated site is live.

The entire process runs automatically on every push to your configured branch. No manual steps, no dashboard clicks after initial setup.

Troubleshooting

Build fails with "command not found": Ensure your buildCommand matches a script in your package.json, or use the full binary path (e.g., ./node_modules/.bin/eleventy).

Build succeeds but site is empty: Check that outputDir matches exactly where your framework writes output. Run the build locally and confirm the directory exists and contains your HTML files.

Build succeeds but wrong files are deployed: You may have a nested output path. Check if your framework outputs to a subdirectory inside the directory you specified.

Getting Started

Create your pandastack.json, push it to GitHub, and connect your repository at [dashboard.pandastack.io](https://dashboard.pandastack.io). Full documentation is available at [docs.pandastack.io](https://docs.pandastack.io).

Ready to deploy?

Start free on PandaStack — no credit card required.

Start free on PandaStack

More in Tutorial

Browse all Tutorial articles →

See also