File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 5252 "lint-staged" : " lint-staged" ,
5353 "next-with-deps" : " ./scripts/next-with-deps.sh" ,
5454 "next" : " cross-env NEXT_TELEMETRY_DISABLED=1 node --trace-deprecation --enable-source-maps packages/next/dist/bin/next" ,
55- "next-no-sourcemaps" : " cross-env NEXT_TELEMETRY_DISABLED=1 node --trace-deprecation packages/next/dist/bin/next " ,
55+ "next-no-sourcemaps" : " echo 'No longer supported. Use `pnpm next --disable-source-maps` instead'; exit 1; " ,
5656 "clean-trace-jaeger" : " node scripts/rm.mjs test/integration/basic/.next && TRACE_TARGET=JAEGER pnpm next build test/integration/basic" ,
5757 "debug" : " cross-env NEXT_TELEMETRY_DISABLED=1 node --inspect --trace-deprecation --enable-source-maps packages/next/dist/bin/next" ,
5858 "postinstall" : " node scripts/git-configure.mjs && node scripts/install-native.mjs" ,
Original file line number Diff line number Diff line change @@ -172,6 +172,11 @@ program
172172 '-H, --hostname <hostname>' ,
173173 'Specify a hostname on which to start the application (default: 0.0.0.0).'
174174 )
175+ . option (
176+ '--disable-source-maps' ,
177+ "Don't start the Dev server with `--enable-source-maps`." ,
178+ false
179+ )
175180 . option (
176181 '--experimental-https' ,
177182 'Starts the server with HTTPS and generates a self-signed certificate.'
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ import { clearTimeout } from 'timers'
3939import { flushAllTraces , trace } from '../trace'
4040
4141export type NextDevOptions = {
42+ disableSourceMaps : boolean
4243 turbo ?: boolean
4344 turbopack ?: boolean
4445 port : number
@@ -265,7 +266,9 @@ const nextDev = async (
265266 delete nodeOptions [ 'max_old_space_size' ]
266267 }
267268
268- nodeOptions [ 'enable-source-maps' ] = true
269+ if ( ! options . disableSourceMaps ) {
270+ nodeOptions [ 'enable-source-maps' ] = true
271+ }
269272
270273 if ( nodeDebugType ) {
271274 const address = getParsedDebugAddress ( )
You can’t perform that action at this time.
0 commit comments