Skip to content

Initial Guides Cleanup and Review #1273

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jun 12, 2017
Merged
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: 1 addition & 1 deletion components/footer/footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default (props) => {
<footer className="footer">
<Container className="footer__inner">
<section className="footer__left">
<Link className="footer__link" to="/guides/get-started">Get Started</Link>
<Link className="footer__link" to="/guides/getting-started">Get Started</Link>
<Link className="footer__link" to="/organization">Organization</Link>
<Link className="footer__link" to="/support">Support</Link>
<Link className="footer__link" to="/guides/why-webpack#comparison">Comparison</Link>
Expand Down
2 changes: 1 addition & 1 deletion content/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ These options allow webpack to display various [stats](/configuration/stats/) an
| Shortcut | Replaces |
|----------|------------------------------------------------------------------|
| -d | --debug --devtool eval-cheap-module-source-map --output-pathinfo |
| -p | --optimize-minimize --define process.env.NODE_ENV="production", see [building for production](/guides/production-build) |
| -p | --optimize-minimize --define process.env.NODE_ENV="production", see [building for production](/guides/production) |


### Profiling
Expand Down
2 changes: 1 addition & 1 deletion content/concepts/entry-points.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ contributors:
- chrisVillanueva
---

Like we mentioned in the [introduction](/guides/get-started/#using-webpack-with-a-config), there are multiple ways to define the `entry` property in your webpack configuration. We will show you the ways you **can** configure the `entry` property, in addition to explaining why it may be useful to you.
As mentioned in [Getting Started](/guides/getting-started/#using-a-configuration), there are multiple ways to define the `entry` property in your webpack configuration. We will show you the ways you **can** configure the `entry` property, in addition to explaining why it may be useful to you.


## Single Entry (Shorthand) Syntax
Expand Down
2 changes: 1 addition & 1 deletion content/configuration/configuration-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Besides exporting a single config object, there are a few more ways that cover o

## Exporting a function to use `--env`

Eventually you will find the need to disambiguate in your `webpack.config.js` between [development](/guides/development) and [production builds](/guides/production-build). You have (at least) two options:
Eventually you will find the need to disambiguate in your `webpack.config.js` between [development](/guides/development) and [production builds](/guides/production). You have (at least) two options:

Instead of exporting a configuration object, you may return a function which accepts an environment as argument. When running webpack, you may specify build environment keys via `--env`, such as `--env.production` or `--env.platform=web`.

Expand Down
2 changes: 1 addition & 1 deletion content/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This index lists common terms used throughout the webpack ecosystem.

## B

- [**Bundle**](/guides/get-started/#creating-a-bundle): Produced from a number of distinct modules, bundles contain the final versions of source files that have already undergone the loading and compilation process.
- [**Bundle**](/guides/getting-started/#creating-a-bundle): Produced from a number of distinct modules, bundles contain the final versions of source files that have already undergone the loading and compilation process.
- [**Bundle Splitting**](/guides/code-splitting): This process offers one way of optimizing a build, allowing webpack to generate multiple bundles for a single application. As a result, each bundle can be isolated from changes effecting others, reducing the amount of code that needs to be republished and therefore re-downloaded by the client and taking advantage of browser caching.


Expand Down
1 change: 1 addition & 0 deletions content/guides/asset-management.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Asset Management
sort: 3
contributors:
- skipjack
- michael-ciniawsky
Expand Down
3 changes: 2 additions & 1 deletion content/guides/author-libraries.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Authoring Libraries
sort: 12
contributors:
- pksjce
- johnstew
Expand Down Expand Up @@ -207,7 +208,7 @@ If `library` is set and `libraryTarget` is not, `libraryTarget` defaults to `var

### Final Steps

[Tweak your production build using webpack](/guides/production-build).
[Tweak your production build using webpack](/guides/production).

Add the path to your generated bundle as the package's main file in `package.json`

Expand Down
3 changes: 2 additions & 1 deletion content/guides/build-performance.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Improving Build Performance
title: Build Performance
sort: 25
---

?> incremental builds
Expand Down
5 changes: 4 additions & 1 deletion content/guides/caching.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
---
title: Caching
sort: 41
sort: 9
contributors:
- okonet
- jouni-kantola
related:
- title: Predictable Long Term Caching
url: https://medium.com/webpack/predictable-long-term-caching-with-webpack-d3eee1d3fa31
---

To enable long-term caching of static resources produced by webpack:
Expand Down
2 changes: 1 addition & 1 deletion content/guides/code-splitting-async.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Code Splitting - Async
sort: 33
sort: 17
contributors:
- simon04
- levy9527
Expand Down
2 changes: 1 addition & 1 deletion content/guides/code-splitting-css.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Code Splitting - CSS
sort: 31
sort: 15
contributors:
- pksjce
- jonwheeler
Expand Down
6 changes: 3 additions & 3 deletions content/guides/code-splitting-libraries.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Code Splitting - Libraries
sort: 32
sort: 16
contributors:
- pksjce
- chrisVillanueva
Expand Down Expand Up @@ -186,7 +186,7 @@ module.exports = function(env) {
};
```

With the above webpack config, we see three bundles being generated. `vendor`, `main` and `manifest` bundles.
With the above webpack config, we see three bundles being generated: `vendor`, `main` and `manifest`.

Using what we have learned so far, we could also achieve the same result with an implicit common vendor chunk.

Expand Down Expand Up @@ -214,7 +214,7 @@ module.exports = function() {
}
}),
//CommonChunksPlugin will now extract all the common modules from vendor and main bundles
new webpack.optimize.CommonsChunkPlugin({
new webpack.optimize.CommonsChunkPlugin({
name: 'manifest' //But since there are no more common modules between them we end up with just the runtime code included in the manifest file
})
]
Expand Down
2 changes: 1 addition & 1 deletion content/guides/code-splitting.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Code Splitting
sort: 30
sort: 14
contributors:
- pksjce
- pastelsky
Expand Down
3 changes: 2 additions & 1 deletion content/guides/comparison.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Comparison with other bundlers
title: Bundler Comparison
sort: 25
contributors:
- pksjce
- bebraw
Expand Down
1 change: 1 addition & 0 deletions content/guides/compatibility.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Handling Compatibility
sort: 25
---

?> require.main
Expand Down
2 changes: 1 addition & 1 deletion content/guides/dependency-management.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Dependency Management
sort: 60
sort: 20
contributors:
- ndelangen
- chrisVillanueva
Expand Down
2 changes: 1 addition & 1 deletion content/guides/development-vagrant.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Development - Vagrant
sort: 51
sort: 19
contributors:
- SpaceK33z
- chrisVillanueva
Expand Down
2 changes: 1 addition & 1 deletion content/guides/development.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Development
sort: 50
sort: 5
contributors:
- SpaceK33z
- rafde
Expand Down
5 changes: 3 additions & 2 deletions content/guides/environment-variables.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
title: Using environment variables
title: Environment Variables
sort: 11
contributors:
- simon04
---

To disambiguate in your `webpack.config.js` between [development](/guides/development) and [production builds](/guides/production-build), you may use environment variables.
To disambiguate in your `webpack.config.js` between [development](/guides/development) and [production builds](/guides/production), you may use environment variables.

The standard approach in Node.js modules can be applied: Set an environment variable when running webpack and refer to the variables using Node's [`process.env`](https://nodejs.org/api/process.html#process_process_env). The variable `NODE_ENV` is commonly used as de-facto standard (see [here](https://dzone.com/articles/what-you-should-know-about-node-env)).

Expand Down
205 changes: 0 additions & 205 deletions content/guides/get-started.md

This file was deleted.

Loading