title: Is there any benefit to import the entire module before importing part of it?
body: <p>Currently I am studying the project <a href="https://github.com/AngularClass/angular2-webpack-starter" rel="nofollow"><strong>angular2-webpack-starter</strong></a>. Its <code>webpack.config.js</code> has two entries: <code>main.ts</code> and <code>vendor.ts</code>.</p>
  
  <p>main.ts</p>
  
  <pre><code>import {provide} from 'angular2/core';
  import {bootstrap, ELEMENT_PROBE_PROVIDERS} from 'angular2/platform/browser';
  import {ROUTER_PROVIDERS, LocationStrategy, HashLocationStrategy} from 'angular2/router';
  import {HTTP_PROVIDERS} from 'angular2/http';
  
  import {App} from './app/app';
  
  document.addEventListener('DOMContentLoaded', function main() {
    bootstrap(App, [
      ...('production' === process.env.ENV ? [] : ELEMENT_PROBE_PROVIDERS),
      ...HTTP_PROVIDERS,
      ...ROUTER_PROVIDERS,
      provide(LocationStrategy, { useClass: HashLocationStrategy })
    ])
    .catch(err =&gt; console.error(err));
  });
  </code></pre>
  
  <p>vendor.ts</p>
  
  <pre><code>// Polyfills
  import 'es6-shim';
  // (these modules are what are in 'angular2/bundles/angular2-polyfills' so don't use that here)
  import 'es6-promise';
  import 'zone.js/lib/browser/zone-microtask';
  
  if ('production' !== process.env.ENV) {
    // Reflect Polyfill
    require('es7-reflect-metadata/dist/browser');
    Error['stackTraceLimit'] = Infinity;
    Zone['longStackTraceZone'] = require('zone.js/lib/zones/long-stack-trace.js');
  }
  
  if ('production' === process.env.ENV) {
    // Reflect with es7-reflect-metadata/reflect-metadata is added
    // by webpack.prod.config ProvidePlugin
    let ngCore = require('angular2/core');
    ngCore.enableProdMode();
  }
  // Angular 2
  import 'angular2/platform/browser';
  import 'angular2/platform/common_dom';
  import 'angular2/router';
  import 'angular2/http';
  import 'angular2/core';
  
  // RxJS
  import 'rxjs';
  </code></pre>
  
  <p>I understand the <code>vendor.js</code> is to import dependencies. But why are angular2 modules imported here? Since they are imported in other files (like <code>main.ts</code>) as well, it seems there is no necessity to import them twice or in advance.</p>