Skip to content

Commit 8369c4b

Browse files
committed
Fix internal pnpm next --disable-source-maps
1 parent 56f2f12 commit 8369c4b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"prepublishOnly": "turbo run build",
5252
"lint-staged": "lint-staged",
5353
"next-with-deps": "./scripts/next-with-deps.sh",
54-
"next": "cross-env NEXT_TELEMETRY_DISABLED=1 node --trace-deprecation --enable-source-maps packages/next/dist/bin/next",
54+
"next": "cross-env NEXT_TELEMETRY_DISABLED=1 NODE_OPTIONS=\"--trace-deprecation --enable-source-maps\" next",
5555
"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",

packages/next/src/cli/next-dev.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,9 @@ const nextDev = async (
266266
delete nodeOptions['max_old_space_size']
267267
}
268268

269-
if (!options.disableSourceMaps) {
269+
if (options.disableSourceMaps) {
270+
delete nodeOptions['enable-source-maps']
271+
} else {
270272
nodeOptions['enable-source-maps'] = true
271273
}
272274

0 commit comments

Comments
 (0)