Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion docs-next/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@ import { createMDX } from "fumadocs-mdx/next";

const withMDX = createMDX();

// `basePath` is only needed for the deployed GH Pages URL
// (docs.byteveda.org/taskito). In dev (`pnpm dev`) it makes `localhost:3000`
// 404 because the app moves to `localhost:3000/taskito`. Scope it to
// production so dev hits the root.
const isProd = process.env.NODE_ENV === "production";

/** @type {import('next').NextConfig} */
const config = {
output: "export",
basePath: "/taskito",
basePath: isProd ? "/taskito" : "",
reactStrictMode: true,
images: {
unoptimized: true,
Expand Down
Loading