Supported Frameworks
ZeroDeploy works with any framework that produces static files.
What Works
- Single-page applications (SPAs)
- Static site generators (SSG)
- Pre-rendered pages
- Client-side rendered apps
- Any framework with a static export option
What Doesn’t Work
- Server-side rendering (SSR)
- API routes or serverless functions
- Edge middleware
- Server components (React Server Components)
- Dynamic server-side data fetching
Framework Configuration
Below are the configurations needed to produce static output from popular frameworks.
Vite
Vite projects work out of the box. Just build and deploy:
npm run build
zerodeploy deploy
Output directory: dist/ (auto-detected)
Create React App
CRA produces static files by default:
npm run build
zerodeploy deploy --dir build
Output directory: build/
Vue (Vite)
Vue projects with Vite work out of the box:
npm run build
zerodeploy deploy
Output directory: dist/ (auto-detected)
Next.js
Next.js requires static export mode. Add this to your next.config.js:
// next.config.js
module.exports = {
output: 'export',
// Optional: Add trailing slash for cleaner URLs
trailingSlash: true,
}
Then build and deploy:
npm run build
zerodeploy deploy --dir out
Output directory: out/
Nuxt
Nuxt can generate a fully static site. Set ssr: false for SPA mode or use nuxt generate for pre-rendered static pages:
// nuxt.config.ts
export default defineNuxtConfig({
ssr: false, // SPA mode - client-side only
})
Or for pre-rendered static pages:
npx nuxt generate
zerodeploy deploy --dir .output/public
Output directory: .output/public/ or dist/
Astro
Astro is static by default. No configuration needed unless you’ve enabled SSR:
npm run build
zerodeploy deploy
If you’ve added an SSR adapter, remove it or set static output:
// astro.config.mjs
export default defineConfig({
output: 'static', // Ensure static output
})
Output directory: dist/ (auto-detected)
Remix
Remix requires the Vite SPA mode for static deployments:
// vite.config.ts
import { vitePlugin as remix } from "@remix-run/dev";
export default {
plugins: [
remix({
ssr: false, // SPA mode
}),
],
};
Then build and deploy:
npm run build
zerodeploy deploy --dir build/client
Output directory: build/client/
SvelteKit
SvelteKit requires the static adapter:
npm install -D @sveltejs/adapter-static
// svelte.config.js
import adapter from '@sveltejs/adapter-static';
export default {
kit: {
adapter: adapter({
fallback: 'index.html' // For SPA mode
})
}
};
Then build and deploy:
npm run build
zerodeploy deploy --dir build
Output directory: build/
Gatsby
Gatsby produces static files by default:
npm run build
zerodeploy deploy --dir public
Output directory: public/
Angular
Angular produces static files by default:
ng build
zerodeploy deploy --dir dist/your-project-name/browser
Output directory: dist/<project-name>/browser/
SPA Routing
For single-page applications with client-side routing (React Router, Vue Router, etc.),
add a _redirects file to the root of your build output with this rule:
/* /index.html 200
This tells ZeroDeploy to serve index.html for any path that doesn’t match a file,
ensuring deep links and browser refresh work correctly.
See Redirects & Rewrites for more details.
Need Help?
If your framework isn’t listed or you need help configuring static export, open an issue and we’ll help you out.