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

webpack-manifest-resource-plugin

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-manifest-resource-plugin - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

23

lib/plugin.js

@@ -34,2 +34,11 @@ var path = require('path');

// old version not include publicPath
ManifestPlugin.prototype.normalizeFile = function(manifest, publicPath) {
var normalizeManifest = {};
Object.keys(manifest).forEach(key => {
normalizeManifest[key] = manifest[key].replace(publicPath, '');
});
return normalizeManifest;
};
ManifestPlugin.prototype.normalize = function(manifest) {

@@ -40,3 +49,7 @@ var normalizeManifest = {};

const normalizeValue = manifest[key].replace(/\\/g, '/');
normalizeManifest[normalizeKey] = normalizeValue;
if(this.opts.proxy){
normalizeManifest[normalizeKey] = normalizeValue.replace(this.opts.host,'');
}else{
normalizeManifest[normalizeKey] = normalizeValue;
}
});

@@ -189,6 +202,10 @@ return normalizeManifest;

}
var buildPath = this.opts.buildPath.replace(this.opts.baseDir, '').replace(/^\//, '');
var fileNormalizeManifest = this.normalizeFile(manifest, publicPath);
var normalizeManifest = this.normalize(manifest);
var depsManifest = this.getDeps(normalizeManifest, this.opts.commonsChunk);
var resource = { res: normalizeManifest, deps: depsManifest, info: { publicPath } };
var resource = Object.assign({}, fileNormalizeManifest, {
deps: depsManifest,
info: { publicPath, buildPath}
});
var json = JSON.stringify(resource, null, 2);

@@ -195,0 +212,0 @@

2

package.json
{
"name": "webpack-manifest-resource-plugin",
"version": "0.0.2",
"version": "0.0.3",
"description": "js file resource dependencies",

@@ -5,0 +5,0 @@ "keywords": [

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