Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

docs(webpack): remove barrel #1389

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions public/docs/_examples/webpack/ts/src/app/index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion public/docs/_examples/webpack/ts/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { bootstrap } from '@angular/platform-browser-dynamic';
import { enableProdMode } from '@angular/core';

import { AppComponent } from './app';
import { AppComponent } from './app/app.component';

// #docregion enable-prod
if (process.env.ENV === 'production') {
Expand Down
11 changes: 3 additions & 8 deletions public/docs/ts/latest/guide/webpack.jade
Original file line number Diff line number Diff line change
Expand Up @@ -412,14 +412,12 @@ code-example(format="").
`webpack/ts/src/app/app.component.ts,
webpack/ts/src/app/app.component.html,
webpack/ts/src/app/app.component.css,
webpack/ts/src/app/app.component.spec.ts,
webpack/ts/src/app/index.ts`,
webpack/ts/src/app/app.component.spec.ts`,
null,
`src/app/app.component.ts,
src/app/app.component.html,
src/app/app.component.css,
src/app/app.component.spec.ts,
src/app/index.ts`
src/app/app.component.spec.ts`
)

+makeTabs(
Expand All @@ -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` 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 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`.

// WHAT GOOD IS THIS?
* We coded our app feature as a [barrel](../glossary.html#barrel).

<a id="conclusions"></a>
:marked
## Conclusions
Expand Down