title: How do I use Javascript ES6 ES2015 modules to export / import constants directly to the import module namespace?
body: <p>OK, I can't quite find the answer to this. I am using webpack and babel es2015 preset to handle ES2015 modules.</p>
  
  <p>Module 1 to export, filename "foobar.js"</p>
  
  <pre><code>export const FOO = 'foo'
  export const BAR = 'bar'
  </code></pre>
  
  <p>Is there a way to import this constant into my global namespace in my import module?</p>
  
  <p>I want to do this in my module that will use the constants:</p>
  
  <pre><code>import 'foobar'
  
  const doSomething = () =&gt; { console.log(FOO + BAR) }
  </code></pre>
  
  <p>I know that this would work:</p>
  
  <pre><code>import * as CONSTANTS from 'foobar'
  
  const doSomething = () =&gt; { console.log(CONSTANTS.FOO + CONSTANTS.BAR) }
  </code></pre>
  
  <p>...and that there are other ways to achieve the same result of the import being in a particular namespace. But I want to use the constants without a prefix. </p>
  
  <p>Is there a way to directly import ALL the exports from a different module into the root namespace of the importing module?</p>
  
  <p>*NOTE: I know that I can do this:</p>
  
  <pre><code>import {FOO, BAR} from 'foobar'
  </code></pre>
  
  <p>But then I have to explicitly reference each of the constants in the import, which leads to more headaches rather than less.</p>