File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed
Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change 11/** @type {import('next').NextConfig } */
2- const repo = 'photography-portfolio' ;
3- const isProd = process . env . NODE_ENV === 'production' ;
4- const basePath = isProd ? `/${ repo } ` : '' ;
5-
6- const nextConfig = {
2+ module . exports = {
73 reactStrictMode : true ,
84 output : 'export' ,
9- basePath,
10- assetPrefix : basePath ,
5+ // Use a plain object so GitHub's configure-pages step can parse/inject safely
6+ basePath : process . env . NODE_ENV === 'production' ? '/photography-portfolio' : '' ,
7+ assetPrefix : process . env . NODE_ENV === 'production' ? '/photography-portfolio' : '' ,
118 trailingSlash : true ,
129 images : { unoptimized : true } ,
13- env : { NEXT_PUBLIC_BASE_PATH : basePath }
10+ env : {
11+ NEXT_PUBLIC_BASE_PATH : process . env . NODE_ENV === 'production' ? '/photography-portfolio' : ''
12+ }
1413} ;
15-
16- module . exports = nextConfig ;
17-
You can’t perform that action at this time.
0 commit comments