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 dev
from the root
Debug the app in vscode
- Run the
Launch Chrome
debug configuration in vscode
- Set a breakpoint on line 4 of
libs/ui/src/Box.tsx
import 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.json
hack 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/*" }
Metadata
Metadata
Assignees
Labels
No labels