title: Functions not defined but can be used in console (Webpack)
body: <p>When using webpack I'm having issues with functions</p>
  
  <p>Functions defined like this aren't available at all:</p>
  
  <pre><code>function foo() {
      console.log("bar")
  }
  </code></pre>
  
  <p>When I define a function like this it works in the console:</p>
  
  <pre><code>window.foo = function() {
      console.log("bar")
  }
  </code></pre>
  
  <p>But it doesn't work when called from code like </p>
  
  <pre><code>window.test = function () {
      foo()
  };
  </code></pre>
  
  <p><code>&lt;button onclick="test()"&gt;</code></p>