title: Do ES6 modules only import what is used?
body: <p>Is there is a performance or behavioural difference between importing from an index file or importing individual modules?</p>
  
  <p>For example, with an index file (<code>@/modules/user</code>) of...</p>
  
  <pre><code>import routes from './routes'
  import controller from './controller'
  
  const user = {
    routes,
    controller
  }
  
  export default user
  </code></pre>
  
  <p>If I import just the routes from that file...</p>
  
  <pre><code>import user from '@/modules/user'
  
  const routes = Router()
  
  routes.use('/user', user.routes)
  </code></pre>
  
  <p>Is this any different to just importing the routes individually from their own file (<code>@/modules/user/routes</code>)? Does the controller get imported as it's in the user object?</p>
  
  <pre><code>import userRoutes from '@/modules/user/routes'
  
  const routes = Router()
  
  routes.use('/user', userRoutes)
  </code></pre>