-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
655a867
commit d11102c
Showing
2 changed files
with
9 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = { | ||
output: 'export', | ||
// Set the basePath to your repository name if it's not the root domain | ||
basePath: '/nextjs-boilerplate', // Replace 'your-repo-name' with the actual name of your GitHub repository | ||
|
||
// Set the assetPrefix to serve assets correctly | ||
assetPrefix: '/nextjs-boilerplate/', // Ensure this matches your basePath | ||
const isProd = process.env.NODE_ENV === 'production'; | ||
|
||
// Enable trailing slash to ensure paths work correctly | ||
const nextConfig = { | ||
output: 'export', | ||
basePath: isProd ? '/nextjs-boilerplate' : '', // Use an empty string for development | ||
assetPrefix: isProd | ||
? 'https://sivamani-18.github.io/nextjs-boilerplate/' | ||
: undefined, | ||
trailingSlash: true, | ||
|
||
// Optional: other Next.js configurations can go here | ||
}; | ||
|
||
export default nextConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters