extract-text-webpack-plugin
Advanced tools
Comparing version 0.3.8 to 0.4.0
@@ -8,4 +8,5 @@ /* | ||
function ExtractedModule(identifier, source, sourceMap, addtitionalInformation) { | ||
function ExtractedModule(identifier, originalModule, source, sourceMap, addtitionalInformation) { | ||
this._identifier = identifier; | ||
this._originalModule = originalModule; | ||
this._source = source; | ||
@@ -12,0 +13,0 @@ this._sourceMap = sourceMap; |
22
index.js
@@ -172,3 +172,3 @@ /* | ||
if(meta.content) | ||
extractCompilation.addResultToChunk(module.identifier(), meta.content, extractedChunk); | ||
extractCompilation.addResultToChunk(module.identifier(), meta.content, module, extractedChunk); | ||
callback(); | ||
@@ -178,3 +178,3 @@ }.bind(this)); | ||
if(meta.content) | ||
extractCompilation.addResultToChunk(module.identifier(), meta.content, extractedChunk); | ||
extractCompilation.addResultToChunk(module.identifier(), meta.content, module, extractedChunk); | ||
callback(); | ||
@@ -201,2 +201,11 @@ } | ||
if(extractedChunk.modules.length) { | ||
extractedChunk.modules.sort(function(a, b) { | ||
var ai = a.identifier(); | ||
var bi = b.identifier(); | ||
if(ai < bi) | ||
return -1; | ||
if(ai > bi) | ||
return 1; | ||
return 0; | ||
}); | ||
var chunk = extractedChunk.originalChunk; | ||
@@ -243,9 +252,9 @@ var source = this.renderExtractedChunk(extractedChunk); | ||
ExtractTextPluginCompilation.prototype.addModule = function(identifier, source, additionalInformation, sourceMap) { | ||
ExtractTextPluginCompilation.prototype.addModule = function(identifier, originalModule, source, additionalInformation, sourceMap) { | ||
if(!this.modulesByIdentifier[identifier]) | ||
return this.modulesByIdentifier[identifier] = new ExtractedModule(identifier, source, sourceMap, additionalInformation); | ||
return this.modulesByIdentifier[identifier] = new ExtractedModule(identifier, originalModule, source, sourceMap, additionalInformation); | ||
return this.modulesByIdentifier[identifier]; | ||
}; | ||
ExtractTextPluginCompilation.prototype.addResultToChunk = function(identifier, result, extractedChunk) { | ||
ExtractTextPluginCompilation.prototype.addResultToChunk = function(identifier, result, originalModule, extractedChunk) { | ||
if(!Array.isArray(result)) { | ||
@@ -258,4 +267,3 @@ result = [[identifier, result]]; | ||
var i = item.slice(); | ||
i[0] = item[0] + (c || ""); | ||
var module = this.addModule.apply(this, i); | ||
var module = this.addModule.call(this, item[0] + (c || ""), originalModule, item[1], item[2], item[3]); | ||
extractedChunk.addModule(module); | ||
@@ -262,0 +270,0 @@ module.addChunk(extractedChunk); |
{ | ||
"name": "extract-text-webpack-plugin", | ||
"version": "0.3.8", | ||
"author": "Tobias Koppers @sokra", | ||
"description": "Extract text from bundle into a file.", | ||
"peerDependencies": { | ||
"webpack": "^1.4.2" | ||
}, | ||
"dependencies": { | ||
"async": "~0.2.10", | ||
"source-map": "~0.1.38", | ||
"loader-utils": "~0.2.3" | ||
}, | ||
"devDependencies": { | ||
"file-loader": "*", | ||
"style-loader": "*", | ||
"css-loader": "*", | ||
"webpack": "*" | ||
}, | ||
"homepage": "http://github.com/webpack/extract-text-webpack-plugin", | ||
"repository": { | ||
"type": "git", | ||
"url": "http://github.com/webpack/extract-text-webpack-plugin.git" | ||
}, | ||
"licenses": [ | ||
{ | ||
"type": "MIT", | ||
"url": "http://www.opensource.org/licenses/mit-license.php" | ||
} | ||
] | ||
"name": "extract-text-webpack-plugin", | ||
"version": "0.4.0", | ||
"author": "Tobias Koppers @sokra", | ||
"description": "Extract text from bundle into a file.", | ||
"peerDependencies": { | ||
"webpack": "^1.4.2" | ||
}, | ||
"dependencies": { | ||
"async": "~0.2.10", | ||
"source-map": "~0.1.38", | ||
"loader-utils": "~0.2.3" | ||
}, | ||
"devDependencies": { | ||
"file-loader": "*", | ||
"style-loader": "*", | ||
"css-loader": "*", | ||
"webpack": "*" | ||
}, | ||
"homepage": "http://github.com/webpack/extract-text-webpack-plugin", | ||
"repository": { | ||
"type": "git", | ||
"url": "http://github.com/webpack/extract-text-webpack-plugin.git" | ||
}, | ||
"licenses": [ | ||
{ | ||
"type": "MIT", | ||
"url": "http://www.opensource.org/licenses/mit-license.php" | ||
} | ||
] | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18030
409