Skip to content

Commit

Permalink
feat(gatsby): Enable source maps when compiling Gatsby files in devel…
Browse files Browse the repository at this point in the history
…opment (#36450)
  • Loading branch information
Auspicus authored Sep 20, 2022
1 parent 5b3b565 commit a9b2de8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions docs/docs/debugging-the-build-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ We won't go in depth here about how to debug in VS Code - for that you can check
"request": "launch",
"program": "${workspaceRoot}/node_modules/.bin/gatsby",
"args": ["develop"],
"env": {
"PARCEL_WORKERS": "0",
"GATSBY_CPU_COUNT": "1",
},
"runtimeArgs": ["--nolazy"],
"console": "integratedTerminal"
},
Expand All @@ -104,6 +108,10 @@ We won't go in depth here about how to debug in VS Code - for that you can check
"request": "launch",
"program": "${workspaceRoot}/node_modules/.bin/gatsby",
"args": ["build"],
"env": {
"PARCEL_WORKERS": "0",
"GATSBY_CPU_COUNT": "1",
},
"runtimeArgs": ["--nolazy"],
"console": "integratedTerminal"
}
Expand All @@ -126,6 +134,10 @@ We won't go in depth here about how to debug in VS Code - for that you can check
"program": "${workspaceRoot}/node_modules/gatsby/dist/bin/gatsby"
},
"args": ["develop"],
"env": {
"PARCEL_WORKERS": "0",
"GATSBY_CPU_COUNT": "1",
},
"runtimeArgs": ["--nolazy"],
"console": "integratedTerminal"
},
Expand All @@ -138,6 +150,10 @@ We won't go in depth here about how to debug in VS Code - for that you can check
"program": "${workspaceRoot}/node_modules/gatsby/dist/bin/gatsby"
},
"args": ["build"],
"env": {
"PARCEL_WORKERS": "0",
"GATSBY_CPU_COUNT": "1",
},
"runtimeArgs": ["--nolazy"],
"console": "integratedTerminal"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby/src/utils/parcel/compile-gatsby-files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function constructParcel(siteRoot: string, cache?: Cache): Parcel {
root: {
outputFormat: `commonjs`,
includeNodeModules: false,
sourceMap: false,
sourceMap: process.env.NODE_ENV === `development`,
engines: {
node: _CFLAGS_.GATSBY_MAJOR === `5` ? `>= 18.0.0` : `>= 14.15.0`,
},
Expand Down

0 comments on commit a9b2de8

Please sign in to comment.