Skip to content

Commit

Permalink
docs: consistent typesetting of webpack versions
Browse files Browse the repository at this point in the history
  • Loading branch information
simon04 authored and skipjack committed Jun 20, 2017
1 parent 76fc321 commit 7bfdfdc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion content/guides/code-splitting-async.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ async function main() {
### `System.import` is deprecated
The use of `System.import` in webpack [did not fit the proposed spec](https://github.com/webpack/webpack/issues/2163), so it was deprecated in [v2.1.0-beta.28](https://github.com/webpack/webpack/releases/tag/v2.1.0-beta.28) in favor of `import()`.
The use of `System.import` in webpack [did not fit the proposed spec](https://github.com/webpack/webpack/issues/2163), so it was deprecated in webpack [2.1.0-beta.28](https://github.com/webpack/webpack/releases/tag/v2.1.0-beta.28) in favor of `import()`.
## `require.ensure()`
Expand Down
6 changes: 3 additions & 3 deletions content/guides/migrating.md
Original file line number Diff line number Diff line change
Expand Up @@ -616,11 +616,11 @@ Loaders are now cacheable by default. Loaders must opt-out if they are not cache

### Complex options

__webpack v1__ only supports `JSON.stringify`-able options for loaders.
__webpack 1__ only supports `JSON.stringify`-able options for loaders.

__webpack v2__ now supports any JS object as loader options.
__webpack 2__ now supports any JS object as loader options.

Before [v2.2.1](https://github.com/webpack/webpack/releases/tag/v2.2.1) (i.e. from v2.0.0 through v2.2.0), using complex options required using `ident` for the `options` object to allow its reference from other loaders. __This was removed in v2.2.1__ and thus current migrations do not require any use of the `ident` key.
Before webpack [2.2.1](https://github.com/webpack/webpack/releases/tag/v2.2.1) (i.e. from 2.0.0 through 2.2.0), using complex options required using `ident` for the `options` object to allow its reference from other loaders. __This was removed in 2.2.1__ and thus current migrations do not require any use of the `ident` key.

```diff
{
Expand Down
2 changes: 1 addition & 1 deletion content/plugins/loader-options-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ contributors:
- skipjack
---

The `LoaderOptionsPlugin` is unlike other plugins in that it is built for migration from webpack version 1 to version 2. In webpack v2, the schema for a `webpack.config.js` became stricter; no longer open for extension by other loaders and plugins. The intention is that you pass `options` directly to loaders and plugins (i.e. `options` are __not__ global or shared).
The `LoaderOptionsPlugin` is unlike other plugins in that it is built for migration from webpack 1 to 2. In webpack 2, the schema for a `webpack.config.js` became stricter; no longer open for extension by other loaders and plugins. The intention is that you pass `options` directly to loaders and plugins (i.e. `options` are __not__ global or shared).

However, until a loader has been updated to depend upon options being passed directly to them, the `LoaderOptionsPlugin` exists to bridge the gap. You can configure global loader options with this plugin and all loaders will receive these options.

Expand Down

0 comments on commit 7bfdfdc

Please sign in to comment.