title: Export all constants from another file
body: <p>I would like to create <code>index.js</code> file where all constants and default exports from another files will be exported. For example:</p>
  
  <p><strong>userActions.js</strong>:</p>
  
  <pre><code>export const login = (username, password) =&gt; { ... }
  export const logout = () =&gt; { ... }
  </code></pre>
  
  <p><strong>User.js</strong>:</p>
  
  <pre><code>export default class User { ... }
  </code></pre>
  
  <p><strong>Book.js</strong>:</p>
  
  <pre><code>export default class Book { ... }
  </code></pre>
  
  <p><strong>index.js</strong></p>
  
  <pre><code>import { login, logout } from './userActions'
  import Book from './Book'
  import User from './User'
  
  export { login, logout, Book, User }
  </code></pre>
  
  <p>And then, it will be possible this in any file:</p>
  
  <pre><code>import { login, Book, User } from './index.js'
  </code></pre>
  
  <p>Unfortunately, I often add new user actions and I don't want to change index.js every time. So I would like use this in <strong>index.js</strong>:</p>
  
  <pre><code>export * from './userActions'
  </code></pre>
  
  <p>Somewhere in another file (everything works)...</p>
  
  <pre><code>import * as allExports from './index.js'
  console.log(allExports) // { login: ƒ, logout: ƒ, __esModule: true }
  </code></pre>
  
  <p>But if I add default exports to the named exports (<strong>index.js</strong>):</p>
  
  <pre><code>import Book from './Book'
  import User from './User'
  export * from './userActions'
  export { Book, User }
  </code></pre>
  
  <p>There is only first default export (somewhere in another file):</p>
  
  <pre><code>import * as allExports from './index.js'
  console.log(allExports) // { Book: f, __esModule: true }
  // Expected output is: { Book: f, User: f, login: ƒ, logout: ƒ, __esModule: true }
  </code></pre>
  
  <p>Is there any solution for this?</p>