Skip to content

Commit

Permalink
Updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
webdeveric committed Dec 7, 2020
1 parent 13bf19b commit ea29308
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 11 deletions.
1 change: 1 addition & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"lcov",
"prebuild",
"prefetch",
"preload",
"subpage",
"subresource",
"tapable",
Expand Down
49 changes: 38 additions & 11 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,18 @@ This webpack plugin will generate a JSON file that matches the original filename

## Installation

- Version 4 works with webpack 4.40+ (webpack 4 branch only)
- Version 3.1 works with webpack 4.4+.
- Version 2 works with webpack 4+.

```shell
npm install webpack-assets-manifest --save-dev
```

If you're using webpack 3 or below, you'll need to install version 1.

```shell
npm install webpack-assets-manifest@1 --save-dev
```
## New in version 5

* Compatible with webpack 5 only (5.1+ required).
* Supports finding [asset modules](https://webpack.js.org/guides/asset-modules/).
* Updated options schema to prevent additional properties. This helps with catching typos in option names.
* :warning: Updated default value of the `output` option to be `assets-manifest.json`.
This is to prevent confusion when working with [Web app manifests](https://developer.mozilla.org/en-US/docs/Web/Manifest) or [WebExtension manifests](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json).

## New in version 4

* Requires Node 10+.
Expand All @@ -31,6 +29,36 @@ npm install webpack-assets-manifest@1 --save-dev
* Updated [`writeToDisk`](#writeToDisk) option to default to `auto`.
* Use lock files for various operations.
* `done` hook is now an `AsyncSeriesHook`.
* :warning: The structure of the `entrypoints` data has been updated to include `preload` and `prefetch` assets. Assets for an entrypoint are now included in an `assets` property under the entrypoint.

Example:

```json
{
"entrypoints": {
"main": {
"assets": {
"css": [
"main.css"
],
"js": [
"main.js"
]
},
"prefetch": {
"js": [
"prefetch.js"
]
},
"preload": {
"js": [
"preload.js"
]
}
}
}
}
```

## Usage

Expand Down Expand Up @@ -86,7 +114,7 @@ Is the plugin enabled?

Type: `string`

Default: `manifest.json`
Default: `assets-manifest.json`

This is where to save the manifest file relative to your webpack `output.path`.

Expand Down Expand Up @@ -422,4 +450,3 @@ new WebpackAssetsManifest({
}
});
```

0 comments on commit ea29308

Please sign in to comment.