Skip to content

Commit

Permalink
Configure source map overrides for turbopack (vercel#67497)
Browse files Browse the repository at this point in the history
Follow-up from vercel#66254 to add debugging support for turbopack.
  • Loading branch information
unstubbable authored Jul 5, 2024
1 parent 7e37892 commit 09f115d
Showing 1 changed file with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,14 @@
"webpack://_N_E/[.]/(.*)": "${workspaceFolder}/${input:appDirname}/.next/server/$1",
"webpack://_N_E/(?:../)*src/(.*)": "${workspaceFolder}/packages/next/src/$1",
"webpack://next/./dist/src/*": "${workspaceFolder}/packages/next/src/*",
"webpack:///./app/(.*)": "${workspaceFolder}/${input:appDirname}/app/$1"
"webpack:///./app/(.*)": "${workspaceFolder}/${input:appDirname}/app/$1",
"turbopack://[project]/*": "${workspaceFolder}/*"
},
"env": {
// Enable the following environment variables to use turbopack instead of webpack:
// "TURBOPACK": "1",
// "TURBOPACK_DEV": "1",
// "TURBOPACK_BUILD": "1",
"NEXT_PRIVATE_LOCAL_WEBPACK": "1",
"NEXT_TELEMETRY_DISABLED": "1"
}
Expand All @@ -67,7 +72,8 @@
"webpack://_N_E/[.]/(.*)": "${workspaceFolder}/${fileDirname}/.next/server/$1",
"webpack://_N_E/(?:../)*src/(.*)": "${workspaceFolder}/packages/next/src/$1",
"webpack://next/./dist/src/*": "${workspaceFolder}/packages/next/src/*",
"webpack:///./app/(.*)": "${workspaceFolder}/${fileDirname}/app/$1"
"webpack:///./app/(.*)": "${workspaceFolder}/${fileDirname}/app/$1",
"turbopack://[project]/*": "${workspaceFolder}/*"
},
"env": {
"NEXT_PRIVATE_LOCAL_WEBPACK": "1",
Expand All @@ -91,7 +97,8 @@
"webpack://_N_E/[.]/(.*)": "${workspaceFolder}/test/e2e/app-dir/app/.next/server/$1",
"webpack://_N_E/(?:../)*src/(.*)": "${workspaceFolder}/packages/next/src/$1",
"webpack://next/./dist/src/*": "${workspaceFolder}/packages/next/src/*",
"webpack:///./app/(.*)": "${workspaceFolder}/test/e2e/app-dir/app/app/$1"
"webpack:///./app/(.*)": "${workspaceFolder}/test/e2e/app-dir/app/app/$1",
"turbopack://[project]/*": "${workspaceFolder}/*"
},
"env": {
"NEXT_PRIVATE_LOCAL_WEBPACK": "1",
Expand All @@ -115,7 +122,8 @@
"webpack://_N_E/[.]/(.*)": "${workspaceFolder}/test/e2e/app-dir/app/.next/server/$1",
"webpack://_N_E/(?:../)*src/(.*)": "${workspaceFolder}/packages/next/src/$1",
"webpack://next/./dist/src/*": "${workspaceFolder}/packages/next/src/*",
"webpack:///./app/(.*)": "${workspaceFolder}/test/e2e/app-dir/app/app/$1"
"webpack:///./app/(.*)": "${workspaceFolder}/test/e2e/app-dir/app/app/$1",
"turbopack://[project]/*": "${workspaceFolder}/*"
},
"env": {
"NEXT_PRIVATE_LOCAL_WEBPACK": "1",
Expand All @@ -139,7 +147,8 @@
"webpack://_N_E/[.]/(.*)": "${workspaceFolder}/examples/hello-world/.next/server/$1",
"webpack://_N_E/(?:../)*src/(.*)": "${workspaceFolder}/packages/next/src/$1",
"webpack://next/./dist/src/*": "${workspaceFolder}/packages/next/src/*",
"webpack:///./app/(.*)": "${workspaceFolder}/examples/hello-world/app/$1"
"webpack:///./app/(.*)": "${workspaceFolder}/examples/hello-world/app/$1",
"turbopack://[project]/*": "${workspaceFolder}/*"
},
"env": {
"NEXT_PRIVATE_LOCAL_WEBPACK": "1",
Expand All @@ -162,7 +171,8 @@
"webpack://_N_E/[.]/(.*)": "${workspaceFolder}/examples/hello-world/.next/server/$1",
"webpack://_N_E/(?:../)*src/(.*)": "${workspaceFolder}/packages/next/src/$1",
"webpack://next/./dist/src/*": "${workspaceFolder}/packages/next/src/*",
"webpack:///./app/(.*)": "${workspaceFolder}/examples/hello-world/app/$1"
"webpack:///./app/(.*)": "${workspaceFolder}/examples/hello-world/app/$1",
"turbopack://[project]/*": "${workspaceFolder}/*"
},
"skipFiles": ["<node_internals>/**"],
"env": {
Expand All @@ -186,7 +196,8 @@
"webpack://_N_E/[.]/(.*)": "${workspaceFolder}/examples/hello-world/.next/server/$1",
"webpack://_N_E/(?:../)*src/(.*)": "${workspaceFolder}/packages/next/src/$1",
"webpack://next/./dist/src/*": "${workspaceFolder}/packages/next/src/*",
"webpack:///./app/(.*)": "${workspaceFolder}/examples/hello-world/app/$1"
"webpack:///./app/(.*)": "${workspaceFolder}/examples/hello-world/app/$1",
"turbopack://[project]/*": "${workspaceFolder}/*"
},
"env": {
"NEXT_PRIVATE_LOCAL_WEBPACK": "1",
Expand All @@ -206,7 +217,8 @@
"webpack://_N_E/[.]/(.*)": "${workspaceFolder}/${fileDirname}/.next/server/$1",
"webpack://_N_E/(?:../)*src/(.*)": "${workspaceFolder}/packages/next/src/$1",
"webpack://next/./dist/src/*": "${workspaceFolder}/packages/next/src/*",
"webpack:///./app/(.*)": "${workspaceFolder}/${fileDirname}/app/$1"
"webpack:///./app/(.*)": "${workspaceFolder}/${fileDirname}/app/$1",
"turbopack://[project]/*": "${workspaceFolder}/*"
},
"env": {
"NEXT_PRIVATE_LOCAL_WEBPACK": "1",
Expand All @@ -227,7 +239,8 @@
"webpack://_N_E/[.]/(.*)": "${workspaceFolder}/${fileDirname}/.next/server/$1",
"webpack://_N_E/(?:../)*src/(.*)": "${workspaceFolder}/packages/next/src/$1",
"webpack://next/./dist/src/*": "${workspaceFolder}/packages/next/src/*",
"webpack:///./app/(.*)": "${workspaceFolder}/${fileDirname}/app/$1"
"webpack:///./app/(.*)": "${workspaceFolder}/${fileDirname}/app/$1",
"turbopack://[project]/*": "${workspaceFolder}/*"
},
"env": {
"HEADLESS": "true",
Expand Down

0 comments on commit 09f115d

Please sign in to comment.