Skip to content

Commit

Permalink
Fix internal pnpm next --disable-source-maps
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Oct 25, 2024
1 parent 850119d commit bf1878f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"prepublishOnly": "turbo run build",
"lint-staged": "lint-staged",
"next-with-deps": "./scripts/next-with-deps.sh",
"next": "cross-env NEXT_TELEMETRY_DISABLED=1 node --trace-deprecation --enable-source-maps packages/next/dist/bin/next",
"next": "cross-env NEXT_TELEMETRY_DISABLED=1 NODE_OPTIONS=\"--trace-deprecation --enable-source-maps\" next",
"next-no-sourcemaps": "echo 'No longer supported. Use `pnpm next --disable-source-maps` instead'; exit 1;",
"clean-trace-jaeger": "node scripts/rm.mjs test/integration/basic/.next && TRACE_TARGET=JAEGER pnpm next build test/integration/basic",
"debug": "cross-env NEXT_TELEMETRY_DISABLED=1 node --inspect --trace-deprecation --enable-source-maps packages/next/dist/bin/next",
Expand Down
4 changes: 3 additions & 1 deletion packages/next/src/cli/next-dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,9 @@ const nextDev = async (
delete nodeOptions['max_old_space_size']
}

if (!options.disableSourceMaps) {
if (options.disableSourceMaps) {
delete nodeOptions['enable-source-maps']
} else {
nodeOptions['enable-source-maps'] = true
}

Expand Down

0 comments on commit bf1878f

Please sign in to comment.