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

extract-text-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

extract-text-webpack-plugin - npm Package Compare versions

Comparing version 0.7.1 to 0.8.0

35

index.js

@@ -74,11 +74,17 @@ /*

function getOrder(a, b) {
function isInvalidOrder(a, b) {
var bBeforeA = a.getPrevModules().indexOf(b) >= 0;
var aBeforeB = b.getPrevModules().indexOf(a) >= 0;
if(aBeforeB && bBeforeA)
return NaN;
if(bBeforeA)
return 1;
if(aBeforeB)
return -1;
return aBeforeB && bBeforeA;
}
function getOrder(a, b) {
var aIndex = a.getOriginalModule().index2;
var bIndex = b.getOriginalModule().index2;
if(aIndex < bIndex) return -1;
if(aIndex > bIndex) return 1;
var ai = a.identifier();
var bi = b.identifier();
if(ai < bi) return -1;
if(ai > bi) return 1;
return 0;

@@ -200,2 +206,4 @@ }

extractedChunk.name = chunk.name;
extractedChunk.entry = chunk.entry;
extractedChunk.initial = chunk.initial;
chunk.chunks.forEach(function(c) {

@@ -268,16 +276,7 @@ extractedChunk.addChunk(extractedChunks[chunks.indexOf(c)]);

extractedChunk.modules.sort(function(a, b) {
var order = getOrder(a, b);
if(isNaN(order)) {
if(isInvalidOrder(a, b)) {
compilation.errors.push(new OrderUndefinedError(a.getOriginalModule()));
compilation.errors.push(new OrderUndefinedError(b.getOriginalModule()));
}
if(order !== 0 && !isNaN(order))
return order;
var ai = a.identifier();
var bi = b.identifier();
if(ai < bi)
return -1;
if(ai > bi)
return 1;
return 0;
return getOrder(a, b);
});

@@ -284,0 +283,0 @@ var chunk = extractedChunk.originalChunk;

{
"name": "extract-text-webpack-plugin",
"version": "0.7.1",
"version": "0.8.0",
"author": "Tobias Koppers @sokra",
"description": "Extract text from bundle into a file.",
"peerDependencies": {
"webpack": "^1.4.2"
"webpack": "^1.9.4"
},

@@ -9,0 +9,0 @@ "dependencies": {

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