node --inspect-brk ./node_modules/.bin/webpack (or whatever file) to start the debugging process. The process will halt at the first line and print a debugger URL. Copy the debugger URL into the Chrome Browser and the developers tools will initialize.
Then go to the JavaScript profiler tab and start profiling After you've pressed stop, the flame graph will be generated.
If you don't want to copy debugger URLs around, you can also use the NIM chrome extension. It discovers debuggable node processes automatically.