title: How do I access a Webpack module from the browser dev tools?
body: <p>I have an ES6 module that is compiled with webpack. To debug it I have to manually attach certain objects to the <code>window</code> so that I can reference them through the debugging tools in Chrome/Safari:</p>
  
  <pre><code>export class Dialog {
    ...
  }
  
  window.debugdialog = Dialog;
  </code></pre>
  
  <p>This is very cumbersome and surely not the best way to do it. Is there a way to reference the modules without having to modify the source?</p>
  
  <p>Yes I know about breakpoints, and I use them. But sometimes I want to load the all the code and tweak the UI by controlling it with inline JavaScript.</p>