Skip to content

SourceMaps don't bind on latest next.js version server side (Docker) #854

Closed
@jasonwilliams

Description

Describe the bug
Next.js now uses eval-source-map from version 9 onwards.
It looks like eval-source-map generates webpack-internal:///./ references.

I added the settings below but it makes no difference:

      "sourceMapPathOverrides": {
        "webpack-internal:///./": "${workspaceFolder}/"
      }

I wonder if

if (parsed.protocol === 'webpack-internal:') {
return undefined;
}
has anything to do with it?

Should webpack-internal:///./ be added to this list?

export function defaultSourceMapPathOverrides(webRoot: string): { [key: string]: string } {
return {
'webpack:///./~/*': `${webRoot}/node_modules/*`,
'webpack:////*': '/*',
'webpack://?:*/*': `${webRoot}/*`,
'webpack:///([a-z]):/(.+)': '$1:/$2',
'meteor://💻app/*': `${webRoot}/*`,
};
}

To Reproduce
Steps to reproduce the behavior:

  1. Clone https://github.com/jasonwilliams/nextjs9-typescript-server-vscode-example
  2. yarn install
  3. docker-composer up
  4. Launch -> launch server (Docker)
  5. set a breakpoint in pages/index.tsx

Log File

VS Code Version: 1.51

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions