docs(webpack): remove barrel

closes #1389
This commit is contained in:
Foxandxss 2016-05-13 22:16:38 +02:00 committed by Ward Bell
parent ad95b04e69
commit 81a87c2bfb
3 changed files with 4 additions and 11 deletions

View File

@ -1,2 +0,0 @@
// #docregion
export * from './app.component.ts';

View File

@ -2,7 +2,7 @@
import { bootstrap } from '@angular/platform-browser-dynamic'; import { bootstrap } from '@angular/platform-browser-dynamic';
import { enableProdMode } from '@angular/core'; import { enableProdMode } from '@angular/core';
import { AppComponent } from './app'; import { AppComponent } from './app/app.component';
// #docregion enable-prod // #docregion enable-prod
if (process.env.ENV === 'production') { if (process.env.ENV === 'production') {

View File

@ -412,14 +412,12 @@ code-example(format="").
`webpack/ts/src/app/app.component.ts, `webpack/ts/src/app/app.component.ts,
webpack/ts/src/app/app.component.html, webpack/ts/src/app/app.component.html,
webpack/ts/src/app/app.component.css, webpack/ts/src/app/app.component.css,
webpack/ts/src/app/app.component.spec.ts, webpack/ts/src/app/app.component.spec.ts`,
webpack/ts/src/app/index.ts`,
null, null,
`src/app/app.component.ts, `src/app/app.component.ts,
src/app/app.component.html, src/app/app.component.html,
src/app/app.component.css, src/app/app.component.css,
src/app/app.component.spec.ts, src/app/app.component.spec.ts`
src/app/index.ts`
) )
+makeTabs( +makeTabs(
@ -442,15 +440,12 @@ code-example(format="").
* The `AppComponent` in `app.component.ts` imports the application-wide css with a simple `import` statement. * The `AppComponent` in `app.component.ts` imports the application-wide css with a simple `import` statement.
* The `AppComponent` itself has its own html template and css files which we load with the `require()` method * The `AppComponent` itself has its own html template and css files which we load with the `require()` method
supplied by Webpack. Webpack stashes those component-scoped files in the `app.ts` bundle too. supplied by Webpack. Webpack stashes those component-scoped files in the `app.js` bundle too.
* The `vendor.ts` consists of vendor dependency `import` statements that drive the `vendor.js` bundle. * The `vendor.ts` consists of vendor dependency `import` statements that drive the `vendor.js` bundle.
The application imports these modules too; they'd be duplicated in the `app.js` bundle The application imports these modules too; they'd be duplicated in the `app.js` bundle
if the `CommonsChunkPlugin` hadn't detected the overlap and removed them from `app.js`. if the `CommonsChunkPlugin` hadn't detected the overlap and removed them from `app.js`.
// WHAT GOOD IS THIS?
* We coded our app feature as a [barrel](../glossary.html#barrel).
<a id="conclusions"></a> <a id="conclusions"></a>
:marked :marked
## Conclusions ## Conclusions