Add Turbopack sourcemap alias#1996
Merged
connor4312 merged 1 commit intomicrosoft:mainfrom Apr 24, 2024
Merged
Conversation
sokra
reviewed
Apr 24, 2024
| 'webpack://?:*/*': `${webRoot}/*`, | ||
| 'webpack:///([a-z]):/(.+)': '$1:/$2', | ||
| 'meteor://💻app/*': `${webRoot}/*`, | ||
| "turbopack://[project]/*": "${workspaceFolder}/*" |
There was a problem hiding this comment.
Suggested change
| "turbopack://[project]/*": "${workspaceFolder}/*" | |
| "turbopack://[project]/*": "${workspaceFolder}/*", |
avianion
reviewed
Apr 24, 2024
| 'webpack://?:*/*': `${webRoot}/*`, | ||
| 'webpack:///([a-z]):/(.+)': '$1:/$2', | ||
| 'meteor://💻app/*': `${webRoot}/*`, | ||
| "turbopack://[project]/*": "${workspaceFolder}/*" |
Member
|
Please run |
Contributor
|
@avianion pinging random people isn't necessary |
|
@Tyriar ok bro |
Contributor
|
@avianion thanks bro |
connor4312
added a commit
that referenced
this pull request
Apr 24, 2024
Contributor
Author
|
Thanks @connor4312 💯 Very helpful! |
Member
|
no problem, this will be out in the VS Code release next week |
Contributor
Author
|
Awesome, thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
We got an issue report on the Next.js repository about the vscode debugger not automatically working with Turbopack enabled: vercel/next.js#63740.
Turbopack (website) is the new bundler we've been building, it supports sourcemaps by default and works really well with VS Code's debugger but requires additional configuration compared to using Next.js with webpack because the debugger has built-in handling of webpack paths like
webpack://.This PR aims to support Turbopack paths in the same way.
On the Turbopack side we have this open PR to add
turbopack://to the sourcemaps: vercel/next.js#64965How?
Updated the
sourceMapPathOverridesdefault to include the required path mapping for Turbopack. Similar to how Webpack and Meteor are handled there.Open questions
Since I'm not familiar with this repository I could use some helping getting this over the line if it's not already good to land.
Specifically what's potentially missing is a test and the docs still need to be updated. It seems
OPTIONS.mdis auto-generated, should I run the script to generate it?Thanks in advance!