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 1.0.0 to 1.1.0-beta.1

37

lib/plugin.js

@@ -48,5 +48,5 @@ var path = require('path');

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

@@ -80,2 +80,23 @@ }

ManifestPlugin.prototype.getResource = function(manifest, publicPath) {
var buildPath = this.opts.buildPath.replace(this.opts.baseDir, '').replace(/^\//, '');
var fileNormalizeManifest = this.normalizeFile(manifest, publicPath);
var normalizeManifest = this.normalize(manifest);
var manifestDll = this.opts.manifestDll;
if (manifestDll && typeof manifestDll === 'boolean') {
return normalizeManifest;
} else {
if (manifestDll && typeof manifestDll === 'object') {
Object.keys(manifestDll).forEach(key => {
normalizeManifest[key] = manifestDll[key];
});
}
var depsManifest = this.getDeps(normalizeManifest, this.opts.commonsChunk);
return Object.assign({}, fileNormalizeManifest, {
deps: depsManifest,
info: { publicPath, buildPath }
});
}
};
ManifestPlugin.prototype.apply = function(compiler) {

@@ -202,10 +223,4 @@ var seed = this.opts.seed || {};

}
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 = Object.assign({}, fileNormalizeManifest, {
deps: depsManifest,
info: { publicPath, buildPath}
});
var resource = this.getResource(manifest, publicPath);
var json = JSON.stringify(resource, null, 2);

@@ -212,0 +227,0 @@

{
"name": "webpack-manifest-resource-plugin",
"version": "1.0.0",
"version": "1.1.0-beta.1",
"description": "manifest resource dependencies",

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

# webpack-manifest-resource-plugin
normalize js resource dependencies for [webpack-manifest-plugin](https://github.com/danethurber/webpack-manifest-plugin)
normalize js/css resource dependencies for [webpack-manifest-plugin](https://github.com/danethurber/webpack-manifest-plugin)

@@ -31,9 +31,9 @@

{
res: {
"mods/alpha.js": "mods/alpha.1234567890.js",
"mods/alpha.css": "mods/alpha.435336266.css",
"mods/omega.js": "mods/omega.0987654321.js",
"mods/omega.css": "mods/omega.323299900.css",
"vendor": "vendor.32465656.js"
},
"mods/alpha.js": "mods/alpha.1234567890.js",
"mods/alpha.css": "mods/alpha.435336266.css",
"mods/omega.js": "mods/omega.0987654321.js",
"mods/omega.css": "mods/omega.323299900.css",
"vendor": "vendor.32465656.js"
deps:{

@@ -40,0 +40,0 @@ "mods/alpha.js":{

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