assets-webpack-plugin
Advanced tools
Comparing version 5.1.1 to 5.1.2
@@ -8,91 +8,96 @@ # Change Log | ||
## 5.1.2 - 2020-09-22 | ||
* Add a new option to include assets that aren't in any chunk using the `includeFilesWithoutChunk` option. | ||
* Closes [#204](https://github.com/ztoben/assets-webpack-plugin/issues/204) | ||
## 5.1.1 - 2020-08-17 | ||
- Allow more than one entry in `includeManifest`. | ||
- Closes [#84](https://github.com/ztoben/assets-webpack-plugin/issues/84) | ||
* Allow more than one entry in `includeManifest`. | ||
* Closes [#84](https://github.com/ztoben/assets-webpack-plugin/issues/84) | ||
## 5.1.0 - 2020-08-17 | ||
- Implements using more relaxed dependencies. | ||
- Fixes [#240](https://github.com/ztoben/assets-webpack-plugin/issues/240) | ||
* Implements using more relaxed dependencies. | ||
* Fixes [#240](https://github.com/ztoben/assets-webpack-plugin/issues/240) | ||
## 5.0.5 - 2020-08-17 | ||
- Plugin will now parse the `.mjs` file extension. | ||
* Plugin will now parse the `.mjs` file extension. | ||
## 5.0.4 - 2020-08-14 | ||
- Fixes [#251](https://github.com/ztoben/assets-webpack-plugin/issues/251) | ||
* Fixes [#251](https://github.com/ztoben/assets-webpack-plugin/issues/251) | ||
## 5.0.3 - 2020-07-09 | ||
- Bumps several dependencies. | ||
* Bumps several dependencies. | ||
## 5.0.2 - 2020-06-15 | ||
- Fixes an error when `keepInMemory` was turn on. | ||
* Fixes an error when `keepInMemory` was turn on. | ||
## 5.0.1 - 2020-06-15 | ||
- Fixes [#234](https://github.com/ztoben/assets-webpack-plugin/issues/234) | ||
* Fixes [#234](https://github.com/ztoben/assets-webpack-plugin/issues/234) | ||
## 5.0.0 - 2020-06-11 | ||
- Unfortunately must bump to v5 instead of v4 due to an old botched release that can't be unpublished | ||
- Major bump due to now requiring node 10 | ||
- Maintains the same changes as `3.10.0`, but properly warns when using an older version of node | ||
* Unfortunately must bump to v5 instead of v4 due to an old botched release that can't be unpublished | ||
* Major bump due to now requiring node 10 | ||
* Maintains the same changes as `3.10.0`, but properly warns when using an older version of node | ||
## 3.10.0 - 2020-06-08 (Deprecated) | ||
- Updates several dependencies | ||
- Fixes [#226](https://github.com/ztoben/assets-webpack-plugin/issues/226) | ||
* Updates several dependencies | ||
* Fixes [#226](https://github.com/ztoben/assets-webpack-plugin/issues/226) | ||
## 3.9.10 - 2019-02-28 | ||
- Fixes [#169](https://github.com/ztoben/assets-webpack-plugin/issues/169) | ||
* Fixes [#169](https://github.com/ztoben/assets-webpack-plugin/issues/169) | ||
## 3.9.9 - 2019-02-28 | ||
- Adds the `integrity` option to add output from webpack-subresource-integrity to the json file | ||
- Fixes [#63](https://github.com/ztoben/assets-webpack-plugin/issues/63) | ||
* Adds the `integrity` option to add output from webpack-subresource-integrity to the json file | ||
* Fixes [#63](https://github.com/ztoben/assets-webpack-plugin/issues/63) | ||
## 3.9.8 - 2019-02-27 | ||
- Dependency updates | ||
- Fixes [#167](https://github.com/ztoben/assets-webpack-plugin/issues/167) | ||
* Dependency updates | ||
* Fixes [#167](https://github.com/ztoben/assets-webpack-plugin/issues/167) | ||
## 3.9.7 - 2018-10-04 | ||
- Allow webpack 4 entrypoints chunks | ||
- Fixes [#108](https://github.com/ztoben/assets-webpack-plugin/issues/108) | ||
* Allow webpack 4 entrypoints chunks | ||
* Fixes [#108](https://github.com/ztoben/assets-webpack-plugin/issues/108) | ||
## 3.9.6 - 2018-08-20 | ||
- Fixes [#125](https://github.com/ztoben/assets-webpack-plugin/issues/125) | ||
* Fixes [#125](https://github.com/ztoben/assets-webpack-plugin/issues/125) | ||
## 3.9.5 - 2018-08-09 | ||
- Adds the `keepInMemory` option to toggle whether you want the assets file generated when running in `webpack-dev-server`. | ||
* Adds the `keepInMemory` option to toggle whether you want the assets file generated when running in `webpack-dev-server`. | ||
## 3.9.4 - 2018-08-08 | ||
- Adds the `includeAllFileTypes`, and `fileTypes` options for controlling which files are included in the assets file. | ||
* Adds the `includeAllFileTypes`, and `fileTypes` options for controlling which files are included in the assets file. | ||
## 3.9.3 - 2018-08-07 | ||
- Fixes an issue where `useCompilerPath` wasn't correctly resolving the path. | ||
* Fixes an issue where `useCompilerPath` wasn't correctly resolving the path. | ||
## 3.9.2 - 2018-08-07 | ||
- Reverts [#109](https://github.com/ztoben/assets-webpack-plugin/pull/109), fixes [#118](https://github.com/ztoben/assets-webpack-plugin/issues/118). | ||
* Reverts [#109](https://github.com/ztoben/assets-webpack-plugin/pull/109), fixes [#118](https://github.com/ztoben/assets-webpack-plugin/issues/118). | ||
## 3.9.1 - 2018-08-06 | ||
- `useCompilerPath` option to override path with webpack output path set in config. | ||
* `useCompilerPath` option to override path with webpack output path set in config. | ||
## 3.9.0 - 2018-08-06 | ||
- ~~Now supports webpack 4 entries with multiple chunks. See [#109](https://github.com/ztoben/assets-webpack-plugin/pull/109) for details.~~ | ||
- Use compiler.outputFileSystem for output. | ||
- Fixes [#108](https://github.com/ztoben/assets-webpack-plugin/issues/108), [#111](https://github.com/ztoben/assets-webpack-plugin/issues/111), and [#92](https://github.com/ztoben/assets-webpack-plugin/issues/92). | ||
* ~~Now supports webpack 4 entries with multiple chunks. See [#109](https://github.com/ztoben/assets-webpack-plugin/pull/109) for details.~~ | ||
* Use compiler.outputFileSystem for output. | ||
* Fixes [#108](https://github.com/ztoben/assets-webpack-plugin/issues/108), [#111](https://github.com/ztoben/assets-webpack-plugin/issues/111), and [#92](https://github.com/ztoben/assets-webpack-plugin/issues/92). | ||
@@ -103,3 +108,3 @@ ## 3.8.4 - 2018-06-20 | ||
- No code changed. Purely for testing tagged releases on git. | ||
* No code changed. Purely for testing tagged releases on git. | ||
@@ -110,3 +115,3 @@ ## 3.8.3 - 2018-06-18 | ||
- Package json was pointing to the wrong index file. | ||
* Package json was pointing to the wrong index file. | ||
@@ -117,3 +122,3 @@ ## 3.8.2 - 2018-06-18 | ||
- Add babel to the build process. | ||
* Add babel to the build process. | ||
@@ -124,3 +129,3 @@ ## 3.8.1 - 2018-06-18 | ||
- Support for listing the manifest entry first when `manifestFirst` option is set. See [#66](https://github.com/ztoben/assets-webpack-plugin/issues/66) for details. | ||
* Support for listing the manifest entry first when `manifestFirst` option is set. See [#66](https://github.com/ztoben/assets-webpack-plugin/issues/66) for details. | ||
@@ -131,3 +136,3 @@ ## 3.8.0 - 2018-06-15 | ||
- Reverts [#90](https://github.com/ztoben/assets-webpack-plugin/pull/90), fixes [#93](https://github.com/ztoben/assets-webpack-plugin/issues/93) and [#92](https://github.com/ztoben/assets-webpack-plugin/issues/92) | ||
* Reverts [#90](https://github.com/ztoben/assets-webpack-plugin/pull/90), fixes [#93](https://github.com/ztoben/assets-webpack-plugin/issues/93) and [#92](https://github.com/ztoben/assets-webpack-plugin/issues/92) | ||
@@ -138,3 +143,3 @@ ## 3.7.2 - 2018-06-14 | ||
- Reduces npm package size [#67](https://github.com/ztoben/assets-webpack-plugin/issues/67) | ||
* Reduces npm package size [#67](https://github.com/ztoben/assets-webpack-plugin/issues/67) | ||
@@ -145,3 +150,3 @@ ## 3.7.1 - 2018-06-13 | ||
- Fixes a parsing error with the asset path introduced by the fix for [#88](https://github.com/ztoben/assets-webpack-plugin/issues/88) | ||
* Fixes a parsing error with the asset path introduced by the fix for [#88](https://github.com/ztoben/assets-webpack-plugin/issues/88) | ||
@@ -152,3 +157,3 @@ ## 3.7.0 - 2018-06-13 | ||
- Adds all assets to the manifest that aren't in a chunk (kudos to [@Kronuz](https://github.com/Kronuz) see [#65](https://github.com/ztoben/assets-webpack-plugin/pull/65)) | ||
* Adds all assets to the manifest that aren't in a chunk (kudos to [@Kronuz](https://github.com/Kronuz) see [#65](https://github.com/ztoben/assets-webpack-plugin/pull/65)) | ||
@@ -159,3 +164,3 @@ ## 3.6.3 - 2018-06-13 | ||
- Add support for multiple files of the same extension (kudos to [@aaronatmycujoo](https://github.com/aaronatmycujoo) see [#79](https://github.com/ztoben/assets-webpack-plugin/pull/79) and [@Kronuz](https://github.com/Kronuz) see [#64](https://github.com/ztoben/assets-webpack-plugin/pull/64)) | ||
* Add support for multiple files of the same extension (kudos to [@aaronatmycujoo](https://github.com/aaronatmycujoo) see [#79](https://github.com/ztoben/assets-webpack-plugin/pull/79) and [@Kronuz](https://github.com/Kronuz) see [#64](https://github.com/ztoben/assets-webpack-plugin/pull/64)) | ||
@@ -166,3 +171,3 @@ ## 3.6.2 - 2018-06-13 | ||
- Fixed incorrect concatination of asset file names and directory path see [#88](https://github.com/ztoben/assets-webpack-plugin/issues/88) | ||
* Fixed incorrect concatination of asset file names and directory path see [#88](https://github.com/ztoben/assets-webpack-plugin/issues/88) | ||
@@ -173,3 +178,3 @@ ## 3.6.1 - 2018-06-13 | ||
- webpack-dev-server (which uses memory-fs) correctly generates the manifest inside the memory file system (kudos to [@Kronuz](https://github.com/Kronuz) see [#90](https://github.com/ztoben/assets-webpack-plugin/pull/90)) | ||
* webpack-dev-server (which uses memory-fs) correctly generates the manifest inside the memory file system (kudos to [@Kronuz](https://github.com/Kronuz) see [#90](https://github.com/ztoben/assets-webpack-plugin/pull/90)) | ||
@@ -180,3 +185,3 @@ ## 3.6.0 - 2018-05-29 | ||
- webpack 4 support (kudos to [@ztoben](https://github.com/ztoben) and [@saveman71](https://github.com/saveman71) see [#89](https://github.com/ztoben/assets-webpack-plugin/pull/89)) | ||
* webpack 4 support (kudos to [@ztoben](https://github.com/ztoben) and [@saveman71](https://github.com/saveman71) see [#89](https://github.com/ztoben/assets-webpack-plugin/pull/89)) | ||
@@ -187,3 +192,3 @@ ## 3.5.1 - 2017-01-20 | ||
- Support for source maps when `includeManifest` option is set. | ||
* Support for source maps when `includeManifest` option is set. | ||
@@ -194,3 +199,3 @@ ## 3.5.0 - 2016-10-21 | ||
- `includeManifest` option (kudos to Matt Krick [@mattkrick](https://github.com/mattkrick)). | ||
* `includeManifest` option (kudos to Matt Krick [@mattkrick](https://github.com/mattkrick)). | ||
[See docs](./README.md#includemanifest) for more details. | ||
@@ -202,3 +207,3 @@ | ||
- Do not write to assets file if output hasn't changed. | ||
* Do not write to assets file if output hasn't changed. | ||
@@ -209,3 +214,3 @@ ## 3.2.0 - 2015-11-17 | ||
- `processOutput` option. | ||
* `processOutput` option. | ||
@@ -216,2 +221,2 @@ ## 3.1.0 - 2015-10-24 | ||
- Config now accepts a `fullPath` option. | ||
* Config now accepts a `fullPath` option. |
@@ -26,2 +26,3 @@ 'use strict'; | ||
includeAllFileTypes: true, | ||
includeFilesWithoutChunk: false, | ||
keepInMemory: false, | ||
@@ -70,5 +71,8 @@ integrity: false | ||
chunks = Object.keys(stats.entrypoints); | ||
if (self.options.includeFilesWithoutChunk) { | ||
chunks.push(''); // push "unnamed" chunk | ||
} | ||
} else { | ||
chunks = Object.keys(stats.assetsByChunkName); | ||
chunks.push(''); // push "unamed" chunk | ||
chunks.push(''); // push "unnamed" chunk | ||
} | ||
@@ -80,3 +84,3 @@ | ||
if (self.options.entrypoints) { | ||
assets = stats.entrypoints[chunkName].assets; | ||
assets = chunkName ? stats.entrypoints[chunkName].assets : stats.assets; | ||
} else { | ||
@@ -83,0 +87,0 @@ assets = chunkName ? stats.assetsByChunkName[chunkName] : stats.assets; |
@@ -22,2 +22,3 @@ const fs = require('fs') | ||
includeAllFileTypes: true, | ||
includeFilesWithoutChunk: false, | ||
keepInMemory: false, | ||
@@ -70,5 +71,8 @@ integrity: false | ||
chunks = Object.keys(stats.entrypoints) | ||
if (self.options.includeFilesWithoutChunk) { | ||
chunks.push('') // push "unnamed" chunk | ||
} | ||
} else { | ||
chunks = Object.keys(stats.assetsByChunkName) | ||
chunks.push('') // push "unamed" chunk | ||
chunks.push('') // push "unnamed" chunk | ||
} | ||
@@ -80,3 +84,3 @@ | ||
if (self.options.entrypoints) { | ||
assets = stats.entrypoints[chunkName].assets | ||
assets = chunkName ? stats.entrypoints[chunkName].assets : stats.assets | ||
} else { | ||
@@ -83,0 +87,0 @@ assets = chunkName ? stats.assetsByChunkName[chunkName] : stats.assets |
{ | ||
"name": "assets-webpack-plugin", | ||
"version": "5.1.1", | ||
"version": "5.1.2", | ||
"description": "Emits a json file with assets paths", | ||
@@ -41,5 +41,5 @@ "main": "dist/index.js", | ||
"chai": "4.2.0", | ||
"css-loader": "4.2.1", | ||
"mini-css-extract-plugin": "0.10.0", | ||
"mocha": "8.1.1", | ||
"css-loader": "4.3.0", | ||
"mini-css-extract-plugin": "0.11.2", | ||
"mocha": "8.1.3", | ||
"rimraf": "3.0.2", | ||
@@ -49,3 +49,3 @@ "snazzy": "8.0.0", | ||
"style-loader": "1.2.1", | ||
"webpack": "4.44.1" | ||
"webpack": "4.44.2" | ||
}, | ||
@@ -52,0 +52,0 @@ "dependencies": { |
# assets-webpack-plugin | ||
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) | ||
[![Build Status](https://travis-ci.org/ztoben/assets-webpack-plugin.svg?branch=master)](https://travis-ci.org/ztoben/assets-webpack-plugin) | ||
[![Build status](https://ci.appveyor.com/api/projects/status/sbchndv12vk45mo3?svg=true)](https://ci.appveyor.com/project/ztoben/assets-webpack-plugin) | ||
[![NPM](https://nodei.co/npm/assets-webpack-plugin.png)](https://www.npmjs.com/package/assets-webpack-plugin) | ||
@@ -13,14 +12,27 @@ | ||
- [Why Is This Useful?](#why-is-this-useful) | ||
* [Why Is This Useful?](#why-is-this-useful) | ||
* [Example output:](#example-output) | ||
* [Install](#install) | ||
* [Configuration](#configuration) | ||
* [Options](#options) | ||
* [`filename`](#filename) | ||
* [`fullPath`](#fullpath) | ||
* [`includeManifest`](#includemanifest) | ||
* [`manifestFirst`](#manifestfirst) | ||
* [`path`](#path) | ||
* [`useCompilerPath`](#usecompilerpath) | ||
* [`prettyPrint`](#prettyprint) | ||
* [`processOutput`](#processoutput) | ||
* [`update`](#update) | ||
* [`metadata`](#metadata) | ||
* [`includeAllFileTypes`](#includeallfiletypes) | ||
* [`fileTypes`](#filetypes) | ||
* [`keepInMemory`](#keepinmemory) | ||
* [`integrity`](#integrity) | ||
* [`entrypoints`](#entrypoints) | ||
* [Using in multi-compiler mode](#using-in-multi-compiler-mode) | ||
* [Using this with Rails](#using-this-with-rails) | ||
* [Using this with ASP.NET Core](#using-this-with-aspnet-core) | ||
* [Test](#test) | ||
- [Install](#install) | ||
- [Configuration](#configuration) | ||
- [Test](#test) | ||
- [Change Log](./changelog.md) | ||
- [Contributing Guidelines](./contributing.md) | ||
## Why Is This Useful? | ||
@@ -46,4 +58,4 @@ | ||
* `"bundle_name"` is the name of the bundle (the key of the entry object in your webpack config, or "main" if your entry is an array). | ||
* `"asset_kind"` is the camel-cased file extension of the asset | ||
* `"bundle_name"` is the name of the bundle (the key of the entry object in your webpack config, or "main" if your entry is an array). | ||
* `"asset_kind"` is the camel-cased file extension of the asset | ||
@@ -146,2 +158,3 @@ For example, given the following webpack config: | ||
to learn more. | ||
**NOTE** for webpack v5, `futureEmitAssets` is defaulted to `false` in development mode. This option requires `output.futureEmitAssets = true` in order to work. | ||
@@ -257,3 +270,3 @@ ```js | ||
Optional. ```['js', 'css']``` by default. | ||
Optional. `['js', 'css']` by default. | ||
@@ -313,6 +326,16 @@ When set and `includeAllFileTypes` is set false, only assets matching these types will be included in the assets file. | ||
#### `includeFilesWithoutChunk` | ||
Optional. `false` by default. | ||
When set and `entrypoints` is set true, will output any files that are part of the unnamed chunk to an additional unnamed ("") entry. | ||
```js | ||
new AssetsPlugin({includeFilesWithoutChunk: true}) | ||
``` | ||
### Using in multi-compiler mode | ||
If you use webpack multi-compiler mode and want your assets written to a single file, | ||
you **must** use the same instance of the plugin in the different configurations. | ||
you __must__ use the same instance of the plugin in the different configurations. | ||
@@ -340,3 +363,2 @@ For example: | ||
### Using this with Rails | ||
@@ -343,0 +365,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39193
578
397