Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

assets-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

assets-webpack-plugin - npm Package Compare versions

Comparing version 3.2.0 to 3.3.0

4

index.js

@@ -74,2 +74,6 @@ var merge = require('lodash.merge');

if (self.options.metadata) {
output.metadata = self.options.metadata;
}
self.writer(output, function (err) {

@@ -76,0 +80,0 @@ if (err) {

2

package.json
{
"name": "assets-webpack-plugin",
"version": "3.2.0",
"version": "3.3.0",
"description": "Emits a json file with assets paths",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -135,2 +135,14 @@ assets-webpack-plugin

__metadata__: Inject metadata into the into the output file. All values will be injected into the key "metadata".
```js
new AssetsPlugin({metadata: {version: 123}})
// Manifest will now contain:
// {
// metadata: {version: 123}
// }
```
### Using in multi-compiler mode

@@ -137,0 +149,0 @@

@@ -303,2 +303,37 @@ /*jshint expr: true*/

it('allows injection of metadata', function (done) {
var webpackConfig = {
entry: path.join(__dirname, 'fixtures/one.js'),
output: {
path: OUTPUT_DIR,
filename: 'index-bundle.js'
},
plugins: [new Plugin({
path: 'tmp',
metadata: {
foo: 'bar',
baz: 'buz'
}
})]
};
var expected = {
main: {
js: 'index-bundle.js'
},
metadata: {
foo: 'bar',
baz: 'buz'
}
};
expected = JSON.stringify(expected);
var args = {
config: webpackConfig,
expected: expected
};
expectOutput(args, done);
});
});
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