Skip to content

Commit 306793a

Browse files
authored
Merge pull request #31 from hellsgor/develop
chore(config): add basePath and assetPrefix for GitHub Pages deployment
2 parents 2f4e96e + b112482 commit 306793a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

next.config.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
import type { NextConfig } from "next";
1+
// import type { NextConfig } from "next";
22

3-
const nextConfig: NextConfig = {
3+
const isProd = process.env.NODE_ENV === "production";
4+
5+
const nextConfig = {
46
output: "export",
7+
basePath: isProd ? "/<repo>" : "",
8+
assetPrefix: isProd ? "/<repo>/" : "",
9+
trailingSlash: true,
510
};
611

712
module.exports = nextConfig;

0 commit comments

Comments
 (0)