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 4.0.0 to 4.2.0

31

lib/plugin.js

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

const manifestDll = this.opts.manifestDll;
const dllConfig = this.opts.dllConfig;
const dllDir = this.opts.dllDir;
const dllChunk = this.opts.dllChunk;
if (manifestDll && typeof manifestDll === 'boolean') {

@@ -114,12 +117,24 @@ return this.normalizeFile(normalizeManifest, this.opts.host);

let commonsChunk = [];
const dllConfig = this.opts.dllConfig;
if (dllConfig) { // 合并 dll manifest 到 manifest
const dllDir = this.opts.dllDir;
if(dllChunk) { // for webpack4 4.2.0
const dll = dllChunk.dll;
const names = dllChunk.names;
const chunks = dllChunk.chunks;
chunks.forEach(chunk => {
normalizeManifest[chunk.id] = chunk.outputPath;
});
commonsChunk = [].concat(dll);
} else if (dllConfig && dllDir) { // 合并 dll manifest 到 manifest for webpack3
const dllArray = Array.isArray(dllConfig) ? dllConfig : [dllConfig];
dllArray.forEach(item => {
const dllManifestPath = path.join(dllDir, `config/manifest-${item.name}.json`);
if (fs.existsSync(dllManifestPath)) {
const dllManifestJSON = require(dllManifestPath);
Object.keys(dllManifestJSON).forEach(key => {
normalizeManifest[key] = dllManifestJSON[key];
const newDllManifestPath = path.join(dllDir, `manifest-${item.name}.json`);
const oldDllManifestPath = path.join(dllDir, `config/manifest-${item.name}.json`);
let dllManifest;
if (fs.existsSync(newDllManifestPath)) {
dllManifest= require(newDllManifestPath);
} else if (fs.existsSync(oldDllManifestPath)) {
dllManifest= require(oldDllManifestPath);
}
if(dllManifest) {
Object.keys(dllManifest).forEach(key => {
normalizeManifest[key] = dllManifest[key];
});

@@ -126,0 +141,0 @@ commonsChunk.push(item);

{
"name": "webpack-manifest-resource-plugin",
"version": "4.0.0",
"version": "4.2.0",
"description": "webpack manifest resource dependencies plugin",

@@ -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