Socket
Socket
Sign inDemoInstall

copy-webpack-plugin

Package Overview
Dependencies
Maintainers
4
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

copy-webpack-plugin - npm Package Compare versions

Comparing version 4.4.3 to 4.5.0

10

CHANGELOG.md

@@ -5,2 +5,12 @@ # Change Log

<a name="4.5.0"></a>
# [4.5.0](https://github.com/webpack-contrib/copy-webpack-plugin/compare/v4.4.3...v4.5.0) (2018-03-02)
### Features
* **processPattern:** add support for `{RegExp)` matches (`pattern.test`) ([#235](https://github.com/webpack-contrib/copy-webpack-plugin/issues/235)) ([1861730](https://github.com/webpack-contrib/copy-webpack-plugin/commit/1861730))
<a name="4.4.3"></a>

@@ -7,0 +17,0 @@ ## [4.4.3](https://github.com/webpack-contrib/copy-webpack-plugin/compare/v4.4.2...v4.4.3) (2018-03-01)

1

dist/processPattern.js

@@ -106,2 +106,3 @@ 'use strict';

file.webpackTo = pattern.to;
file.webpackToRegExp = pattern.test;
}

@@ -108,0 +109,0 @@

@@ -105,2 +105,3 @@ 'use strict';

content: content,
regExp: file.webpackToRegExp,
context: pattern.context

@@ -107,0 +108,0 @@ });

2

package.json
{
"name": "copy-webpack-plugin",
"version": "4.4.3",
"version": "4.5.0",
"description": "Copy files && directories with webpack",

@@ -5,0 +5,0 @@ "author": "Len Boyette",

@@ -58,2 +58,3 @@ [![npm][npm]][npm-url]

|[`toType`](#toType)|`{String}`|``|[toType Options](#toType)|
|[`test`](#test)|`{RegExp}`|``|Pattern for extracting elements to be used in `to` templates|
|[`force`](#force)|`{Boolean}`|`false`|Overwrites files already in `compilation.assets` (usually added by other plugins/loaders)|

@@ -147,2 +148,23 @@ |[`ignore`](#ignore)|`{Array}`|`[]`|Globs to ignore for this pattern|

### `test`
Defines a `{RegExp}` to match some parts of the file path.
These capture groups can be reused in the name property using `[N]` placeholder.
Note that `[0]` will be replaced by the entire path of the file,
whereas `[1]` will contain the first capturing parenthesis of your `{RegExp}`
and so on...
**webpack.config.js**
```js
[
new CopyWebpackPlugin([
{
from: '*/*',
to: '[1]-[2].[hash].[ext]',
test: /([^/]+)\/(.+)\.png$/
}
], options)
]
```
### `force`

@@ -149,0 +171,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc