File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -347,6 +347,7 @@ export const env = createEnv({
347347 // Infrastructure & Deployment
348348 NEXT_RUNTIME : z . string ( ) . optional ( ) , // Next.js runtime environment
349349 DOCKER_BUILD : z . boolean ( ) . optional ( ) , // Flag indicating Docker build environment
350+ NEXT_BUILD_SKIP_SOURCE_MAPS : z . boolean ( ) . optional ( ) , // Omits unused browser source maps in acceptance builds
350351 NEXT_BUILD_SKIP_TYPE_CHECK : z . boolean ( ) . optional ( ) , // Skips `next build`'s TypeScript pass where another CI job type-checks
351352
352353 // Background Jobs & Scheduling
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ const nextConfig: NextConfig = {
3030 // Safe here since this repo's source is already fully public on GitHub -
3131 // no additional exposure versus Next's default (disabled to avoid leaking
3232 // source on the client).
33- productionBrowserSourceMaps : true ,
33+ productionBrowserSourceMaps : ! isTruthy ( env . NEXT_BUILD_SKIP_SOURCE_MAPS ) ,
3434 turbopack : {
3535 root : path . join ( import . meta. dirname , '../..' ) ,
3636 } ,
Original file line number Diff line number Diff line change 207207 ]
208208 },
209209 "build" : {
210- "env" : [" NEXT_BUILD_SKIP_TYPE_CHECK" ],
210+ "env" : [" NEXT_BUILD_SKIP_SOURCE_MAPS " , " NEXT_BUILD_SKIP_TYPE_CHECK" ],
211211 "inputs" : [
212212 " $TURBO_DEFAULT$" ,
213213 " .env*" ,
You can’t perform that action at this time.
0 commit comments