ES6 - is there an elegant way to import all named exports but not the default export? : <p>I am looking for an elegant way to import all named exports without having to import the default as well.</p>

<p>In one file I am exporting many named constants plus a default:</p>

<pre><code>// myModule.js
const myDefault = 'my default' 
export const named1 = 'named1' 
export const named2 = 'named2'
// many more named exports - otherwise this would not be an issue...
export default myDefault 
</code></pre>

<p>In another file I would like to have an elegant way to import all named exports <strong>only</strong>, without having to import the default:</p>

<pre><code>// anotherFile.js
// this is what I would like to do, but syntax is not supported, right?
import { * as namedOnly } from './myModule'
</code></pre>

<p>I do <strong>not</strong> want to:</p>

<pre><code>// anotherFile.js
import myDefault, * as namedOnly from './myModule' 
</code></pre>

<p>because I do not need the default in <code>anotherFile.js</code> and my linting tools bug me about
the defined but unused <code>myDefault</code>. Nor do I want to:</p>

<pre><code>// anotherFile.js
import {
  named1,
  named2,
  ... // many more
} from './myModule'
</code></pre>

<p>because that's too much typing. I also do <strong>not</strong> want to <code>object.omit</code> the default:</p>

<pre><code>// anotherFile.js
import omit from 'object.omit'
import * as all from './myModule'
const namedOnly = omit(all, 'default')
</code></pre>

<p>Thanks for any help!</p>
