Skip to content

Commit 5acf8fa

Browse files
Remove basePath for root domain deployment
1 parent 2cf6b8c commit 5acf8fa

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

next.config.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
/** @type {import('next').NextConfig} */
22
const nextConfig = {
33
output: 'export',
4-
basePath: process.env.NODE_ENV === "production" ? "/" : "",
54
images: {
65
unoptimized: true,
7-
path: process.env.NODE_ENV === "production" ? "/" : "",
86
},
97
reactStrictMode: true,
108
swcMinify: true,

utils/index.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
export const publicFilePath = (path: string) => {
2-
// For deployment to github pages
3-
if (process.env.NODE_ENV === "production") {
4-
return `/${path}`;
5-
} else {
6-
return path;
7-
}
2+
// No need to add prefix anymore
3+
return path;
84
};

0 commit comments

Comments
 (0)