-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
21 lines (19 loc) · 790 Bytes
/
Copy pathnext.config.js
File metadata and controls
21 lines (19 loc) · 790 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/** @type {import('next').NextConfig} */
const isGithubPages = process.env.GITHUB_PAGES === "true";
const nextConfig = {
reactStrictMode: true,
// Static export for GitHub Pages deployment
output: isGithubPages ? "export" : undefined,
// Repo name as base path when deployed to GitHub Pages project site
basePath: isGithubPages ? "/CodeXray" : "",
// Required for next/image in static export
images: isGithubPages ? { unoptimized: true } : {},
trailingSlash: isGithubPages ? true : false,
env: {
// The backend this dashboard observes. Defaults to :8000 but can target
// any instrumented service exposing /metrics and /logs.
NEXT_PUBLIC_BACKEND_URL:
process.env.NEXT_PUBLIC_BACKEND_URL || "http://localhost:8000",
},
};
module.exports = nextConfig;