This repository was archived by the owner on Aug 29, 2025. It is now read-only.
-
-
Couldn't load subscription status.
- Fork 87
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
Incorrect sourceMappingURL path #146
Copy link
Copy link
Open
Description
- Operating System: macOS 11.2.3
- Node Version: 14.16.0
- NPM Version: 6.14.11
- yarn version: 1.22.10
- webpack Version: 5.31.0
- source-map-loader Version: 2.0.1
Expected Behavior
Breakpoint should be bound in vscode debugger without sourceMapPathOverrides hacks.
Actual Behavior
Breakpoint is not bound.
Code
// apps/app/next.config.js
module.exports = {
future: {
webpack5: true,
},
webpack: (config) => {
config.module.rules.push({
test: /\.js$/,
enforce: "pre",
use: ["source-map-loader"],
});
config.ignoreWarnings = [/Failed to parse source map/];
return config;
},
};How Do We Reproduce?
Clone and install
- Clone https://github.com/paynecodes/source-map-loader-issue
- Run
yarn install
Start the app
- Run
yarn devfrom the root
Debug the app in vscode
- Run the
Launch Chromedebug configuration in vscode

- Set a breakpoint on line 4 of
libs/ui/src/Box.tsximport React from "react"; export const Box: React.FC = (props) => { return <div className="box">{props.children}</div>; }
- This breakpoint will only be hit with the
launch.jsonhack where I map a single../to what it should be,../../. Comment out line 16 or launch.json and restart the debugger to reproduce the problem.{ "webpack://_N_E/../libs/*": "${webRoot}/../../libs/*" }
skjnldsv, strarsis and flowsn4ke
Metadata
Metadata
Assignees
Labels
No labels