title: Webpack: Import a file that has functions in the global namespace and have them available?
body: <p>I am trying to import a file using webpack, I do my normal.</p>
  
  <p>import "../../lib/SampleFunctions.js";</p>
  
  <p>Inside this sample functions there are a number of functions created directly on the global namespace i..e</p>
  
  <pre><code>function CreateItem()
  {
  
  };
  
  function CreaturePack(inside)
  {
  
  };
  
  // constructor
  CreaturePack.prototype = Object.create(CreateItem.prototype);
  </code></pre>
  
  <p>but the problem is that CreatePack or CreateItem are not available in the global namespace.</p>
  
  <p>I thouhgt I could fix this using the expose plugin, maybe I am using it wrong.. but I did the following</p>
  
  <pre><code>      {test: /SampleFunctions\.js$/, loader: 'expose?CreaturePack'},
  </code></pre>
  
  <p>I now have a CreaturePack but its an empty object and what about CreateItem ?</p>
  
  <p>Going a little crazy, anyone know how to do this. I want to be able to use import ".....file" but have my objects created in the global scope. The SomeFunctions is a sample and the real file is extremely complex so I cannot refactor it to use ES6 modules.</p>
  
  <p>is there some other better loader that places everything inside the global namespace ?</p>
  
  <p>I have some other files that use it and expects these functions on the global namespace.</p>