File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -950,6 +950,7 @@ jobs:
950950 # lint's type-check and the `build` job's own `next build` (generated route types too)
951951 # already enforce.
952952 NEXT_BUILD_SKIP_TYPE_CHECK : ' true'
953+ NEXT_BUILD_DISABLE_SOURCE_MAPS : ' true'
953954 run : bunx turbo run build --filter=@sim/app
954955
955956 # Everything `next start` reads, including the spreadsheet parse worker it spawns (named, so a
Original file line number Diff line number Diff line change @@ -336,6 +336,7 @@ export const env = createEnv({
336336 // Infrastructure & Deployment
337337 NEXT_RUNTIME : z . string ( ) . optional ( ) , // Next.js runtime environment
338338 DOCKER_BUILD : z . boolean ( ) . optional ( ) , // Flag indicating Docker build environment
339+ NEXT_BUILD_DISABLE_SOURCE_MAPS : z . boolean ( ) . optional ( ) , // Omits source-map processing from builds that do not serve maps
339340 NEXT_BUILD_SKIP_TYPE_CHECK : z . boolean ( ) . optional ( ) , // Skips `next build`'s TypeScript pass where another CI job type-checks
340341
341342 // Background Jobs & Scheduling
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ const nextConfig: NextConfig = {
3131 // Safe here since this repo's source is already fully public on GitHub -
3232 // no additional exposure versus Next's default (disabled to avoid leaking
3333 // source on the client).
34- productionBrowserSourceMaps : true ,
34+ productionBrowserSourceMaps : ! isTruthy ( env . NEXT_BUILD_DISABLE_SOURCE_MAPS ) ,
3535 turbopack : {
3636 root : path . join ( import . meta. dirname , '../..' ) ,
3737 } ,
@@ -169,6 +169,7 @@ const nextConfig: NextConfig = {
169169 ] ,
170170 } ,
171171 experimental : {
172+ turbopackInputSourceMaps : ! isTruthy ( env . NEXT_BUILD_DISABLE_SOURCE_MAPS ) ,
172173 /**
173174 * Turbopack's dev filesystem cache stays ON (this is also the Next default
174175 * since v16.1). It is what makes a dev-server restart cheap: without it every
Original file line number Diff line number Diff line change 165165 ]
166166 },
167167 "build" : {
168+ "env" : [" NEXT_BUILD_DISABLE_SOURCE_MAPS" , " NEXT_BUILD_SKIP_TYPE_CHECK" ],
168169 "inputs" : [
169170 " $TURBO_DEFAULT$" ,
170171 " .env*" ,
You can’t perform that action at this time.
0 commit comments