mirror of
https://github.com/abusoww/tuxmate.git
synced 2026-04-17 19:53:11 +02:00
fix: support both static export (CF Pages) and standalone (Docker) builds
- next.config.ts now checks STATIC_EXPORT env var to toggle output mode - Added pages:build script for Cloudflare Pages to use - Docker uses default 'npm run build' which creates .next/standalone - CF Pages should use 'npm run pages:build' which creates out/
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import type { NextConfig } from "next";
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
output: 'export',
|
||||
// Use 'export' for static hosting (CF Pages), 'standalone' for Docker/self-hosting
|
||||
output: process.env.STATIC_EXPORT === 'true' ? 'export' : 'standalone',
|
||||
images: {
|
||||
unoptimized: true,
|
||||
},
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"build:static": "STATIC_EXPORT=true next build",
|
||||
"pages:build": "STATIC_EXPORT=true npm run build",
|
||||
"start": "next start",
|
||||
"lint": "eslint",
|
||||
"test": "vitest run",
|
||||
|
||||
Reference in New Issue
Block a user