We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5186ac0 commit 752df43Copy full SHA for 752df43
1 file changed
next.config.mjs
@@ -2,7 +2,10 @@
2
const repositoryName = process.env.GITHUB_REPOSITORY?.split("/")[1] ?? "";
3
const isUserPagesRepo = repositoryName.endsWith(".github.io");
4
const basePath =
5
- process.env.GITHUB_ACTIONS === "true" && repositoryName && !isUserPagesRepo
+ process.env.CUSTOM_DOMAIN !== "true" &&
6
+ process.env.GITHUB_ACTIONS === "true" &&
7
+ repositoryName &&
8
+ !isUserPagesRepo
9
? `/${repositoryName}`
10
: "";
11
@@ -11,13 +14,13 @@ const nextConfig = {
14
output: "export",
12
15
trailingSlash: true,
13
16
env: {
- NEXT_PUBLIC_BASE_PATH: basePath
17
+ NEXT_PUBLIC_BASE_PATH: basePath,
18
},
19
images: {
- unoptimized: true
20
+ unoptimized: true,
21
22
basePath,
- assetPrefix: basePath || undefined
23
+ assetPrefix: basePath || undefined,
24
};
25
26
export default nextConfig;
0 commit comments