Breakpoint not being hit after hot module reload

  hot-module-replacement, javascript, webpack

I have a node server running in debug which works fine and hits breakpoints. Also i have hot module replace hooked up.

When changes are made, the HMR updates the files and the changes can be seen. However, now it just skips past the breakpoints.

I’m assuming that when the HMR file is created the debugger doesn’t know about the new file eg. main.<hashcode>.js or somehow the link is lost.

Is there any way tell the debugger there is a new file without restarting the debug session?

Maybe some extra config in webpack config eg.

output: {
    path: path.join(__dirname, 'dist', 'server'),
    filename: './main.js'
  }

Source: Ask Javascript Questions

LEAVE A COMMENT